Share via


PasswordRecovery.SuccessPageUrl 属性

定义

获取或设置成功发送密码后显示的页面的 URL。

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

属性值

密码成功页的 URL。 默认值为 Empty

属性

示例

下面的代码示例设置 PasswordRecovery 控件,以在向用户发送新密码后,将用户重定向到 属性中 SuccessPageUrl 定义的页面。

<%@ page language="C#" %>

<!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 runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
    <div>

    <asp:PasswordRecovery ID="PasswordRecovery1" 
        Runat="server" SuccessPageUrl="newPasswordSent.aspx" />

    </div>
</form>
</body>
</html>
<%@ page language="VB" %>

<!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 runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
    <div>

    <asp:PasswordRecovery ID="PasswordRecovery1" 
        Runat="server" SuccessPageUrl="newPasswordSent.aspx" />

    </div>
</form>
</body>
</html>

注解

属性 SuccessPageUrl 包含成功向用户发送密码后显示的页面 URL。

SuccessPageUrl如果该属性不是 null,则用户将定向到 属性中SuccessPageUrl定义的页面;否则,将刷新包含控件PasswordRecovery的页面。

无法通过主题或样式表主题设置此属性。 有关详细信息,请参阅 ThemeableAttributeASP.NET 主题和外观

适用于

另请参阅