---
title: "Login Status Control in ASP.NET 3.5"  
description: "The Login Status control displays a login link for users who are not authenticated and a logout link for users who are authenticated. The login link t"  
author: "Uttam Misra"  
published: 2010-12-02  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/63/login-status-control-in-asp-dot-net-3-5  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 2 minutes  

---

# Login Status Control in ASP.NET 3.5

The Login Status [control](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control) displays a login link for users who are not authenticated and a logout link for users who are authenticated. The login link takes the user to a login page. The logout link resets the [current user](https://www.mindstick.com/forum/34471/get-current-user-id-in-mvc)'s [identity](https://www.mindstick.com/articles/13090/icon-the-identity-of-your-brand) to be an [anonymous](https://www.mindstick.com/interview/1140/what-is-anonymous-class-in-java) user.

You can [customize the appearance](https://answers.mindstick.com/qa/99786/how-can-you-customize-the-appearance-and-behavior-of-the-home-screen-on-an-iphone) of the Login Status control by setting the Login Text and Login Image Url [properties](https://www.mindstick.com/articles/23331/nootropics-7-different-types-and-their-unique-properties). The login link automatically redirects to the configured login page, and the logout link automatically calls the method Form Authentication. Sign Out for logging off the user.

\

```
<asp:LoginStatus ID="LoginStatus1" runat="server"
LoginText="Log In"
LogoutText="Log Out"
LogoutPageUrl="~/Home.aspx"
LogoutAction="Redirect"
onloggedout="LoginStatus1_LoggedOut" />
```

**\**

##### Login Status control properties:

- Login Text The text displayed if the user is not signed in.
- Login Image Url A URL for an image displayed as an icon for the login link.
- Logout Text The text displayed if the user is authenticated.
- Logout Image Url A URL for an image displayed as an icon for the logout link.
- Logout Action Configures the action the control performs if the [user clicks](https://answers.mindstick.com/qa/34556/if-a-user-clicks-all-the-google-ads-on-my-site-is-it-foul) the logout link that is displayed when the user is authenticated. Valid [options](https://www.mindstick.com/articles/12789/best-options-for-a-home-based-business) are [Refresh](https://www.mindstick.com/forum/12865/how-to-refresh-dropdownlist-but-keep-old-selected-value-json), [Redirect](https://www.mindstick.com/forum/2005/radio-button-redirect), and Redirect To Login Page. The first option just refreshes the current page, the second option redirects to the page configured in the Logout Page Url , and the last option redirects to the login page.
- Logout Page Url A page to redirect to if the user clicks the logout link and the Logout Action is set to Redirect.

---

Original Source: https://www.mindstick.com/blog/63/login-status-control-in-asp-dot-net-3-5

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
