Latest web development tutorials

ASP.NET ForeColor property

Web Control Standard Properties Reference Web Control Standard Properties Reference

Definition and Usage

Foreground color ForeColor property is used to set or return the control (typically the color of the text).

grammar

<asp:webcontrolid="id" ForeColor="color"runat="server" />
属性 描述
color 设置为控件的前景颜色的颜色。必须是合法的 HTML 颜色


Examples

The following example sets the foreground color of the button:

<form runat="server">
<asp:Button id="button1" Text="Submit"
ForeColor="#FF0000" runat="server" />
</form>

The demonstration >>

Web Control Standard Properties Reference Web Control Standard Properties Reference