Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP.NET Style ForeColor Property

ASP.NET ForeColor Property


Style Control the Style control


Definition and Usage

The ForeColor property is used to set or return the foreground color of the control (usually the color of the text).

Syntax

webcontrol

id="

id

" ForeColor=

"color"

runat="server"

/>

property Description
color The color set as the foreground color of the control. Must be a valid HTML color。

Example

The following example sets the foreground color of a button:

ForeColor="#FF0000" runat="server" />

Demo Example »


Try it - Demo

Set the Button control's text color (with declaration and script)


Style Control the Style control