ASP.net LoginStatus – change status to logout when log in successful

asp.net

How should I go about this? I mean how does the control know whether someone is logged in or not? Session ID? Cookies?

Recommendation of which one I should implement? A guide or tutorial would be appreciated.

Best Solution

It's shown in the documentation here: http://msdn.microsoft.com/en-us/library/ms228140.aspx

Remarks
The LoginStatus control has two states:

Logged on to the Web site.

Logged off from the Web site.

The state is determined by the IsAuthenticated property of the Request property.

For more information about using the LoginStatus control and other login controls, see ASP.NET Login Controls Overview

<asp:LoginStatus id="LoginStatus1" loginText="Log In"             logoutAction="Refresh"  logoutText="Log Out"             runat="server" />