Editar

Compartilhar via


ValidationSummary.ForeColor Property

Definition

Gets or sets the foreground color of the control.

public:
 virtual property System::Drawing::Color ForeColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };
public override System.Drawing.Color ForeColor { get; set; }
member this.ForeColor : System.Drawing.Color with get, set
Public Overrides Property ForeColor As Color

Property Value

A Color that represents the foreground color of the control. The default is Red.

Examples

The following code example demonstrates how to use the ForeColor property to specify that the validation summary is displayed with blue text.


<asp:ValidationSummary 
     id="valSum" 
     DisplayMode="BulletList"
     ForeColor="Blue" 
     HeaderText="You must enter a value in the following fields:"
     Font-Names="verdana" 
     Font-Size="12"
     runat="server"/>

<asp:ValidationSummary 
     id="valSum" 
     DisplayMode="BulletList"
     ForeColor="Blue" 
     HeaderText="You must enter a value in the following fields:"
     Font-Names="verdana" 
     Font-Size="12"
     runat="server"/>

Remarks

Use this property to specify the color in which error messages from validation controls are displayed.

Applies to

See also