Using the LoginStatus Control

The LoginStatus control displays either a Login link or a Logout link, depending on your authentication status. When you click the Login link, you are transferred to the Login.aspx page. When you click the Logout link, you are logged out of the website.

The page in Listing 26.28 contains a LoginStatus control (see Figure 26.11).

Figure 26.11. Displaying a Login link with the LoginStatus control.

image

Listing 26.28. ShowLoginStatus.aspx

images

After you open the page in Listing 26.28, if you click the Login link, you are redirected ...

Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.