Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

PasswordRecovery.SuccessTemplate Property

Gets or sets the template used to display the Success view of the PasswordRecovery control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

[BrowsableAttribute(false)]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
[TemplateContainerAttribute(typeof(PasswordRecovery))]
public virtual ITemplate SuccessTemplate { get; set; }

Property Value

Type: System.Web.UI.ITemplate
An ITemplate that contains the template for displaying the PasswordRecovery control in Success view. The default is null.

The SuccessTemplate property contains the template that defines the appearance of the PasswordRecovery control in Success view.

There are no required or optional fields for the PasswordRecovery Success view template.

When you use a template to define the appearance of the Success view, only the following properties affect the behavior of the control:

All other properties are inactive when you use a template for the Success view of the PasswordRecovery control.

The following code example shows the default template for the Success view.

<%@ 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>

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft