WebControl::BorderColor Property
Gets or sets the border color of the Web control.
Assembly: System.Web (in System.Web.dll)
public: [TypeConverterAttribute((WebColorConverter^::typeid))] property Color BorderColor { virtual Color get(); virtual void set(Color value); }
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 Forms Page Code Model. |
Available since 1.1
.jpeg?cs-save-lang=1&cs-lang=cpp)