LoginStatus.LogoutPageUrl Property

Definition

Gets or sets the URL of the logout page.

public:
 virtual property System::String ^ LogoutPageUrl { System::String ^ get(); void set(System::String ^ value); };
[System.Web.UI.Themeable(false)]
public virtual string LogoutPageUrl { get; set; }
[<System.Web.UI.Themeable(false)>]
member this.LogoutPageUrl : string with get, set
Public Overridable Property LogoutPageUrl As String

Property Value

A string containing the URL of the logout page. The default is Empty.

Attributes

Examples

The following code example sets the LogoutPageUrl property to a logout page and the LogoutAction property to Redirect so that the user is redirected when logging out.

<%@ Page Language="C#" AutoEventWireup="False" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:LoginStatus id="LoginStatus1" runat="server"
       LogoutAction="Redirect" 
       LogoutPageUrl="LogoutPage.aspx"/>
       
    </form>
    </body>
</html>
<%@ Page Language="VB" AutoEventWireup="False" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:LoginStatus id="LoginStatus1" runat="server"
       LogoutAction="Redirect" 
       LogoutPageUrl="LogoutPage.aspx"/>
       
    </form>
    </body>
</html>

Remarks

When the LogoutAction property is set to Redirect, the user is redirected to the URL contained in LogoutPageUrl.

If LogoutAction is set to any other value, the contents of the LogoutPageUrl property are ignored.

This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and ASP.NET Themes and Skins.

Applies to

See also