PasswordRecovery.SuccessTemplate 屬性

定義

取得或設定用於顯示 PasswordRecovery 控制項之 [成功] 檢視的樣板。

public:
 virtual property System::Web::UI::ITemplate ^ SuccessTemplate { System::Web::UI::ITemplate ^ get(); void set(System::Web::UI::ITemplate ^ value); };
[System.ComponentModel.Browsable(false)]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
[System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.PasswordRecovery))]
public virtual System.Web.UI.ITemplate SuccessTemplate { get; set; }
[<System.ComponentModel.Browsable(false)>]
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
[<System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.PasswordRecovery))>]
member this.SuccessTemplate : System.Web.UI.ITemplate with get, set
Public Overridable Property SuccessTemplate As ITemplate

屬性值

ITemplate,包含用於在 [成功] 檢視中顯示 PasswordRecovery 控制項的樣板。 預設為 null

屬性

範例

下列程式碼範例顯示 [成功] 檢視的預設範本。

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
    <asp:passwordrecovery id="PasswordRecovery1" runat="server">
        <successtemplate>
            <table border="0">
                <tr>
                    <td>Your password has been sent to you.</td>
                </tr>
            </table>
        </successtemplate>
    </asp:passwordrecovery>

</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">
<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
    <asp:passwordrecovery id="PasswordRecovery1" runat="server">
        <successtemplate>
            <table border="0">
                <tr>
                    <td>Your password has been sent to you.</td>
                </tr>
            </table>
        </successtemplate>
    </asp:passwordrecovery>

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

備註

屬性 SuccessTemplate 包含範本,定義 [成功] 檢視中控制項的外觀 PasswordRecovery

[成功] 檢視範本不需要或選擇性欄位 PasswordRecovery

當您使用範本來定義 [成功] 檢視的外觀時,只有下列屬性會影響控制項的行為:

當您針對控制項的 PasswordRecovery [成功] 檢視使用範本時,所有其他屬性都會處於非作用中狀態。

適用於

另請參閱