ASP.NET BackColorProperty


Style 控件Style Control

Definition and Usage

The BackColor property is used to set or return the background color of a control.

Syntax

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

Property Description
color The color to be set as the background color of the control. Must be a validHTML color。


Example

The following example sets the background color of a button:

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

Demo Example »

Try it - Demo

Set the background color of a Button control (with declaration and script)


Style 控件Style Control Other Extensions