Using the LoginView Control

The LoginView control enables you to display different content to different users depending on their authentication status. For example, the page in Listing 26.39 displays different content for authenticated users and anonymous users (see Figure 26.16).

Figure 26.16. Displaying content to authenticated users with the LoginView control.

image

Listing 26.39. ShowLoginView.aspx

images

The LoginView control in Listing 26.39 contains two templates: an AnonymousTemplate and a LoggedInTemplate. Only one of the two templates is displayed ...

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.