System.Web.UI.WebControls.Style.ForeColor Property

Gets or sets the foreground color (typically the color of the text) of the Web server control.

Syntax

[System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.WebColorConverter))]
[System.ComponentModel.NotifyParentProperty(true)]
[System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "")]
public System.Drawing.Color ForeColor { set; get; }

Value

a System.Drawing.Color

Remarks

Use the Style.ForeColor property to specify the foreground color of the Web server control. The foreground color is usually the color of the text. This property will render on browsers earlier than Microsoft Internet Explorer version 4 for all controls, except the System.Web.UI.WebControls.Image, System.Web.UI.WebControls.AdRotator, System.Web.UI.WebControls.HyperLink and System.Web.UI.WebControls.LinkButton.

Note:

On browsers that do not support styles, this property is rendered as a FONT element.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0