在两个Web表单之间导航 [英] navigating between two web forms
本文介绍了在两个Web表单之间导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用.Net创建Web表单,并且我已经创建了登录表单和注册表单.我需要帮助才能从我的登录表单导航到我的注册表单.
i am using .Net to create web forms and i have created a login form and a registration form. I need help to navigate from my login form to my registration form.
推荐答案
您的问题缺少很多详细信息,但是我上面看到的一个简单答案是在后面的代码中使用Response.Redirect("YourRegistrationPage.aspx");
语句.可能会将其放置在登录页面中作为按钮单击处理程序执行的代码中.
You question lacks a lot of detail, but a simple answer to what I an see above is to use the Response.Redirect("YourRegistrationPage.aspx");
statement in your code-behind. This would likely be placed in code executed as a button click handler on your login page.
Response.Redirect("registrationformnamehere.aspx");
或者您可以使用Server.Transfer
(但只能在同一域上使用)或window.location
(Javascript)
Alternatively you may useServer.Transfer
(but it''ll work only on same domain) orwindow.location
(Javascript)
这篇关于在两个Web表单之间导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文