BorderColor Property

WebControl.BorderColor Property

Gets or sets the border color of the Web control.

Namespace:  System.Web.UI.WebControls
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.Color
A 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.

NoteNote

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.

No code example is currently available or this language may not be supported.
NoteNote

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.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

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.

Community Additions

ADD
Show:
© 2016 Microsoft