System.Web.UI.WebControls.WebControl.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.DefaultValue(typeof(System.Drawing.Color), "")]
public virtual System.Drawing.Color ForeColor { set; get; }

Value

a System.Drawing.Color

Remarks

Use the WebControl.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 earlier than Microsoft Internet Explorer version 4, this property is rendered as <font> tags.

Requirements

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