aspxtreme

LoginStatus Class

System.Web.UI.WebControls Namespace


.NET Framework version 2.0

Detects the user's authentication state and toggles the state of a link to log in to or log out of a Web site.

LoginStatus Class Members

Collapse   Constructors

Visibility Constructor Parameters
public LoginStatus ( )

Collapse   Properties

Visibility Name Value Type Accessibility
public LoginImageUrl String [ Get , Set ]
public LoginText String [ Get , Set ]
public LogoutAction LogoutAction [ Get , Set ]
public LogoutImageUrl String [ Get , Set ]
public LogoutPageUrl String [ Get , Set ]
public LogoutText String [ Get , Set ]

Collapse   Methods

Visibility Name Parameters Return Type
protected OnLoggedOut ( EventArgs e ) Void
protected OnLoggingOut ( LoginCancelEventArgs e ) Void
protected SetDesignModeState ( IDictionary data ) Void

Collapse   Events

Multicast Name Type
multicast LoggedOut EventHandler
multicast LoggingOut LoginCancelEventHandler

Remarks

The LoginStatus control has two states, logged in to the Web site and logged out of the Web site, determined by the IsAuthenticated property of the Page object's Request property.

The LoginStatus control displays either a text or an image link, depending on the setting of the LoginImageUrl and LogoutImageUrl properties. You can display either text or images for one or both states.

When a user is not logged in to the site, the LoginStatus control provides a link to the login page defined in the application configuration settings. When the user is logged in to the Web site, the LoginStatus control provides a link to log out of the Web site. Logging out of the Web site clears the user's authentication status and when using cookies will clear the cookie from the user's client computer. On any subsequent visit to the Web site, the LoginStatus control will display the prompt to log in.

The logout behavior is controlled by the LogoutAction property, which specifies whether to refresh the current page, redirect the user to the login page defined in the application configuration settings, or redirect the user to a page specified by the LogoutPageUrl property. The default is to refresh the current page.

NOTE: When a user uses the LoginStatus control to log out of a Web site, all data present in view state and all post data is lost.

For examples illustrating use of this control, see the individual member types of this class. For syntax information, see LoginStatus in ASP.NET Syntax for Web Controls.

See Also

ASP.NET Login Controls   LoginStatus Web Server Control



Books and more ...


Suggested Reading

Need a break ?



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support aspxtreme