ASP.NET BackColor Property
Definition and Usage
The BackColor property is used to set or return the background color of the control.
Syntax
<asp:webcontrol id="id" BackColor="color" runat="server" />
Property | Description |
---|---|
color | Set the color value for the control background color. It must be a valid HTML Colors. |
Example
The following example sets the background color of the button:
<form runat="server"> <asp:Button id="button1" Text="Submit" BackColor="#FFCC80" runat="server" /> </form>
Example
- Set the background color of the Button control
- Set the background color of the Button control (with declaration and script)