WebControl.BorderColor Property
Gets or sets the border color of the Web control.
Assembly: System.Web (in System.Web.dll)
[<TypeConverterAttribute(typeof(WebColorConverter))>] abstract BorderColor : Color with get, set [<TypeConverterAttribute(typeof(WebColorConverter))>] override BorderColor : Color with get, set
<asp:WebControl BorderColor="Color" />
Property Value
Type: System.Drawing.ColorA Color that represents the border color of the control. The default is Empty, which indicates that this property is not set.
Use the BorderColor property to specify the border color of the Web Server control. This property is set using a Color object.
Note |
|---|
The BorderColor property will render only for certain controls. For example, the Table, Panel, DataGrid, Calendar, and ValidationSummary controls will render this property. It will also work for the CheckBoxList, RadioButtonList, and 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 BorderColor property is not set, the browser will use its default border color. Refer to your browser to determine its default color scheme.
The following example illustrates how to set the BorderColor property of the Table control, which is inherited from the WebControl base class.
Note |
|---|
The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see ASP.NET Web Page Code Model. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note