asp.net.ph

BaseValidator.ForeColor Property

System.Web.UI.WebControls Namespace   BaseValidator Class


Sets or retrieves the color of the message displayed when validation fails.

Syntax


Inline <asp:validator foreColor = strColor ... >
Script Validator.ForeColor [ = strColor ]

Property Value


strColor A System.Drawing.Color that represents the foreground color of the control, using any of the standard .NET color identifiers. See Color Table.

This property is read/write and returns an empty string if not set.

Remarks

ForeColor is used to specify the foreground color of the message displayed when validation fails. This property is set using a System.Drawing.Color object, the possible range of values of which are specified in this workshop's Color Table.

Example

The following example shows how to declaratively set the ForeColor property of a validation control at design time.

<asp:requiredfieldvalidator forecolor = "blue" runat = "server" ... />
See Also

BaseValidator Members   Style   Base Validation Control Properties   Formatting Validation Error Messages Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph