在web.config设置好 <authentication mode="Forms"> <forms name=".ASPXUSERDEMO" loginUrl="login.aspx" protection="All" DefaultUrl="Default.aspx" timeout="60" /> </authentication> 我现在用这段代码验证登陆 Sub Login_Click(Src As Object, E As EventArgs) If (UserEmail.Value = "[email protected]" Or UserEmail.Value = "[email protected]") And UserPass.Value = "password" FormsAuthentication.RedirectFromLoginPage(UserEmail.Value, PersistCookie.Checked) Else Msg.Text = "Invalid Credentials: Please try again" End If End Sub 怎么用session转向啊?
如果是a,就让他跳到a页面
同理,b跳到b页面
<authentication mode="Forms">
<forms name=".ASPXUSERDEMO" loginUrl="login.aspx" protection="All" DefaultUrl="Default.aspx" timeout="60" />
</authentication>
我现在用这段代码验证登陆
Sub Login_Click(Src As Object, E As EventArgs)
If (UserEmail.Value = "[email protected]" Or UserEmail.Value = "[email protected]") And UserPass.Value = "password"
FormsAuthentication.RedirectFromLoginPage(UserEmail.Value, PersistCookie.Checked)
Else
Msg.Text = "Invalid Credentials: Please try again"
End If
End Sub
怎么用session转向啊?