我使用以下登录控件。问题是如果用户正确登录,它会自动重定向到 default.aspx。我只想让它留在登录页面上。有任何想法吗?
代码:
<form id="form1" runat="server">
<h1>Log in to Management</h1>
<p>
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<asp:Login ID="Login1" runat="server"
CreateUserText="Sign Up for a New Account" CreateUserUrl="SignUp.aspx">
</asp:Login>
</AnonymousTemplate>
<LoggedInTemplate>
You are already logged in!
</LoggedInTemplate>
</asp:LoginView>
</p>
<p>
<asp:LoginStatus ID="LoginStatus1" runat="server" />
</p>
</form>