Gets a reference to a collection of properties that define the appearance of error text in the PasswordRecovery control.
Assembly: System.Web (in System.Web.dll)
The PasswordRecovery control. This property is read-only; however, you can set the properties of the Style object it returns. You can set these properties declaratively in the form Property-Subproperty, where Subproperty represents a property of the Style class (for example, FailureTextStyle-ForeColor). You can set the property programmatically in the form Property.Subproperty (for example, FailureTextStyle.ForeColor).property defines the appearance of error messages in the
Common settings include custom background color, text color, and font properties. Theproperty defines the appearance of the following properties:
The following PasswordRecovery style properties are overridden by settings:
When you use templates to define the appearance of the PasswordRecovery control, the property has no effect.
The following code example uses the PasswordRecovery control.property to set the style property for error messages in the
<%@ 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> <title>ASP.NET Example</title> </head> <body> <form id="form1" runat="server"> <asp:PasswordRecovery id="PasswordRecovery1" runat="server" GeneralFailureText="You password cannot be retrieved at this time. Please try again later." QuestionFailureText="Your answer does not match the stored answer. Please try again." UserNameFailureText="We couldn't find that user name. Please try again."> <FailureTextStyle backcolor="Red" forecolor="White"></FailureTextStyle> </asp:PasswordRecovery> </form> </body> </html>
Available since 2.0