This simple control displays:

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition
ASP.NET Core 3 and Angular 9: Full stack web development with .NET Core 3.1 and Angular 9, 3rd Edition
C# in Depth, 4th Edition

–  a login link if the user is not authenticated which automatically redirects to the configured login page

–  a logout link if the user is authenticated which automatically calls the method FormsAuthentication.SignOut

for logging off the user.


You can customize the LoginStatus control easily, because the control is fairly simple:

<asp:LoginStatus ID=”LoginStatus1″ runat=”server”

LoginText=”Sign In”

LogoutText=”Sign Out”


LogoutAction=”Redirect” />

The LoginStatus control offers a couple of properties for customizing the text shown for the links and the URLs to redirect to when the user clicks the link. You can find the most important properties in the next table:




LoginTextThe text displayed if the user is not signed in.
LoginImageUrlA URL for an image displayed as an icon for the login link.
LogoutTextThe text displayed if the user is authenticated.
LogoutImageUrlA URL for an image displayed as an icon for the logout link.

Configures the action the control performs if the user clicks the logout link that isdisplayed when the user is authenticated. Valid options are:

– Refresh –refreshes the current page

– Redirect – redirects to the page configured in the LogoutPageUrl

– RedirectToLoginPage  – redirects to the login page