How to change login status in LoginView control

How to change the status from the first template to the second template when I log in?

<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> 

How to determine login status?

+4
source share
2 answers
+3
source

The LoginView control handles this for you. This is done using ASP.NET Forms authentication and the IsAuthenticated property managed by ASP.NET.

+1
source

Source: https://habr.com/ru/post/1340336/


All Articles