System.Web.UI.WebControls.WebControl.BorderColor Property

Gets or sets the border color of the Web control.

Syntax

[System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.WebColorConverter))]
[System.ComponentModel.DefaultValue(typeof(System.Drawing.Color), "")]
public virtual System.Drawing.Color BorderColor { set; get; }

Value

a System.Drawing.Color

Remarks

Use the WebControl.BorderColor property to specify the border color of the Web Server control. This property is set using a System.Drawing.Color object.

Note:

The WebControl.BorderColor property will render only for certain controls. For example, the System.Web.UI.WebControls.Table, System.Web.UI.WebControls.Panel, System.Web.UI.WebControls.DataGrid, System.Web.UI.WebControls.Calendar, and System.Web.UI.WebControls.ValidationSummary controls will render this property. It will also work for the System.Web.UI.WebControls.CheckBoxList, System.Web.UI.WebControls.RadioButtonList, and System.Web.UI.WebControls.DataList controls, if their RepeatLayout property is set to RepeatLayout.Table, not RepeatLayout.Flow. However, it is rendered as the bordercolor attribute, which is not part of the HTML 3.2 standard. The bordercolor attribute works for Microsoft Internet Explorer version 3.0 or later, but not most other browsers.

When the WebControl.BorderColor property is not set, the browser will use its default border color. Refer to your browser to determine its default color scheme.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0