Export (0) Print
Expand All

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)

[TypeConverterAttribute(typeof(WebColorConverter))]
public:
virtual property Color ForeColor {
	Color get ();
	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.

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
Show:
© 2015 Microsoft