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 of the control's background. It must be a valid HTML color.

Example

This example sets the background color for the button:

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

Example

Set the BackColor of the button control