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 主題和外觀

適用於

另請參閱