【发布时间】:2010-06-29 06:43:32
【问题描述】:
在 asp.net 中,我们在使用表单身份验证时指定重定向 url,如下所示:
<authentication mode="Forms">
<forms name="myApp" loginUrl="Login.aspx" protection="All" defaultUrl="default.aspx" path="/" requireSSL="false"/>
</authentication>
这意味着当用户登录时,会被重定向到“default.aspx” 使用这种方法
FormsAuthentication.RedirectFromLoginPage(IDTextBox.Text, RememberCheckBox.Checked);
现在可以让用户在登录之前选择要重定向到的页面吗?
例如,用户在登录之前从列表中选择要登录的页面,然后在通过身份验证时重定向到该页面而不是 default.aspx 页面。
这可能吗?如果可以,怎么做?
【问题讨论】:
标签: asp.net forms-authentication