在ASP.NET中,当使用以下表单身份验证时,我们指定重定向URL:
<authentication mode="Forms">
<forms name="myApp" loginUrl="Login.aspx" protection="All" defaultUrl="default.aspx" path="/" requireSSL="false"/>
</authentication>
这意味着当用户登录时,将被重定向到
“默认.ASPX”
使用这种方法
FormsAuthentication.RedirectFromLoginPage(IDTextBox.Text, RememberCheckBox.Checked);
现在,是否可以让用户在登录之前选择要重定向到哪个页面?
例如,用户从列表中选择登录前要登录的页面,然后在验证后重定向到此页面,而不是默认的.aspx页面。
有可能吗?如果有,怎么做?