Assembly: System.Web (in system.web.dll)
Property ValueA reference to the TableItemStyle that contains properties that define the appearance of error text.
The FailureTextStyle property defines the appearance of error messages in 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).
Common settings include custom background color, text color, and font properties. The FailureTextStyle property defines the appearance of the following properties:
The style settings for the FailureTextStyle property are merged with the style settings for the PasswordRecovery control. Any settings made in the FailureTextStyle property override the corresponding settings in properties of the PasswordRecovery control.
The following PasswordRecovery style properties are overridden by FailureTextStyle settings:
When you use templates to define the appearance of the PasswordRecovery control, the FailureTextStyle property has no effect.
The following code example uses the FailureTextStyle property to set the style property for error messages in the PasswordRecovery control.
<%@ Page Language="C#" %> <script runat="server"> </script> <html> <head> </head> <body> <form 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>
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.