LogoutAction Enumeration


Indicates the page that the user will be directed to when he or she logs out of the Web site.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public enum LogoutAction

Member nameDescription

Redirects the user to a specified URL.


Redirects the user to the login page defined in the site's configuration files (Machine.config and Web.config).


Reloads the current page with the user logged out.

The LogoutAction enumeration members indicate the action taken when the user logs out of the Web site using the LoginStatus control.

The following code example shows how to set the LoginStatus.LogoutAction property using the LogoutAction enumeration.

<%@ Page Language="C#" AutoEventWireup="False" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" >
    <title>ASP.NET Example</title>
    <form id="form1" runat="server">
    <asp:LoginStatus id="LoginStatus1" runat="server"
       LogoutAction="RedirectToLoginPage" />


.NET Framework
Available since 2.0
Return to top