如何在LoginVIEW控件中更改登录状态
-
15-11-2019 - |
题
如何将第一个模板的状态更改为第二模板,当我登录系统时?
<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ <a href="~/Login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome!
[ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="/Logout.aspx"/> ]
</LoggedInTemplate>
</asp:LoginView>
.
如何检测登录状态?
其他提示
The LoginView Control handles this for you. It is done using the ASP.NET Forms authentication and the "IsAuthenticated" property that is managed by ASP.NET.
不隶属于 StackOverflow