Latest web development tutorials

ASP.NET Style BackColor property

Style Control Style Control

Definition and Usage

BackColor property sets or returns the background color of the control.

grammar

<asp:webcontrolid="id" BackColor="color"runat="server" />

属性 描述
color 设置为控件的背景颜色的颜色。必须是合法的 HTML 颜色


Examples

The following examples set the background color of the button:

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

The demonstration >>

Try - Demo

Setting Button control's background color (with declaration and script)


Style Control Style Control