PasswordRecovery.SuccessText Property

Definition

Gets or sets the text to display after sending a password successfully.

public:
 virtual property System::String ^ SuccessText { System::String ^ get(); void set(System::String ^ value); };
public virtual string SuccessText { get; set; }
member this.SuccessText : string with get, set
Public Overridable Property SuccessText As String

Property Value

The text to display when a password has been successfully sent. The default is "Your password has been sent to you."

Examples

The following code example sets the SuccessText property to "Your password has been sent to the email address in our files."

<%@ 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" 
        successtext="Your password has been sent to the email address in our files.">
        <successtextstyle font-names="Arial" forecolor="Green"></successtextstyle>
    </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" 
        successtext="Your password has been sent to the email address in our files.">
        <successtextstyle font-names="Arial" forecolor="Green"></successtextstyle>
    </asp:passwordrecovery>

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

Remarks

The SuccessText property is displayed in the Success view when a password has been successfully sent to a user.

The style settings in the SuccessTextStyle property define the appearance of the SuccessText property.

When you use a template assigned to the SuccessTemplate property, the SuccessText property has no effect.

If the SuccessPageUrl property is not null, the user is redirected to the page defined in the SuccessPageUrl property, and the PasswordRecovery control's Success view is not shown to the user.

The default text for the property is localized based on the server's locale setting.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and Globalization and Localization.

Applies to

See also