4

How to change status from first Template to second template when I'm login into the system?

<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 detect login status?

Saint
  • 5,397
  • 22
  • 63
  • 107

2 Answers2

3

take a look at this thread

Community
  • 1
  • 1
Steven
  • 181
  • 8
1

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.

Mitchel Sellers
  • 62,228
  • 14
  • 110
  • 173