WebControl::ForeColor Property
Gets or sets the foreground color (typically the color of the text) of the Web server control.
Assembly: System.Web (in System.Web.dll)
[TypeConverterAttribute(typeof(WebColorConverter))] public: virtual property Color ForeColor { Color get (); void set (Color value); }
<asp:WebControl ForeColor="Color" />
Property Value
Type: System.Drawing::ColorA Color that represents the foreground color of the control. The default is Empty.
Use the 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 Image, AdRotator, HyperLink and LinkButton.
Note |
|---|
On browsers earlier than Microsoft Internet Explorer version 4, this property is rendered as <font> tags. |
The following example illustrates how to set the ForeColor property of the Table control, inherited from the WebControl base class.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note