WebControl::ForeColor Property

 

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

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
[TypeConverterAttribute((WebColorConverter^::typeid))]
property Color ForeColor {
	virtual Color get();
	virtual void set(Color value);
}

Property Value

Type: System.Drawing::Color

A 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.

System_CAPS_noteNote

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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: