LogoutAction 枚举

定义

指示用户在注销网站时将被定向到的页面。Indicates the page that the user will be directed to when he or she logs out of the Web site.

public enum class LogoutAction
public enum LogoutAction
type LogoutAction = 
Public Enum LogoutAction
继承
LogoutAction

字段

Redirect 1

将用户重定向至指定的 URL。Redirects the user to a specified URL.

RedirectToLoginPage 2

将用户重定向到站点的配置文件(Machine.config 和 Web.config)中所定义的登录页。Redirects the user to the login page defined in the site's configuration files (Machine.config and Web.config).

Refresh 0

用户注销时重新加载当前页面。Reloads the current page with the user logged out.

示例

下面的代码示例演示如何LoginStatus.LogoutAction LogoutAction使用枚举设置属性。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"
    "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="RedirectToLoginPage" />
       
    </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="RedirectToLoginPage" />
       
    </form>
    </body>
</html>

注解

枚举成员指示用户LoginStatus使用控件从网站注销时执行的操作。 LogoutActionThe LogoutAction enumeration members indicate the action taken when the user logs out of the Web site using the LoginStatus control.

适用于

另请参阅