asp.net.ph

Style.BackColor Property

System.Web.UI.WebControls Namespace   Style Class


Sets or retrieves the background color of a Web control.

Syntax


Inline <asp:control BackColor = strColor ... >
Script Style.BackColor [ = strColor ]

Property Value


strColor A System.Drawing.Color that represents the background color of the control, using any of the standard .NET color identifiers. See Color Table.

This property is read/write and returns an empty string if not set.

Remarks

BackColor is used to specify the color under the content ( the background color ) of a Web server control. This property is set using a System.Drawing.Color object, the possible range of values of which are specified in this workshop's Color Table.

Note that this property will render only for certain controls.

In general, only controls that render as an HTML <table> or <div> element ( block objects ) can display a background color, such as Table, Panel, DataGrid, Calendar, etc.

It will also work for list controls that have their RepeatLayout property set to Table, such as the CheckBoxList, RadioButtonList and DataList.

For controls that render as an HTML <span> tag ( including Label, all validation controls, and list controls with their RepeatLayout property set to Flow ), this property will work only in Internet Explorer 5 and later.

See Also

Style Members   Base Web Control Properties Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph