Style::BorderStyle Property
Gets or sets the border style of the Web server control.
Assembly: System.Web (in System.Web.dll)
public: property BorderStyle BorderStyle { BorderStyle get (); void set (BorderStyle value); }
Property Value
Type: System.Web.UI.WebControls::BorderStyleOne of the BorderStyle enumeration values. The default is NotSet.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The selected value is not one of the BorderStyle enumeration values. |
Use the BorderStyle property to specify the border style for the Web server control. This property is set using one of the BorderStyle enumeration values. The following table lists the possible values.
Border Style | Description |
|---|---|
NotSet | The border style is not set. |
None | No border |
Dotted | A dotted line border. |
Dashed | A dashed line border. |
Solid | A solid line border. |
Double | A solid double line border. |
Groove | A grooved border for a sunken border appearance. |
Ridge | A ridged border for a raised border appearance. |
Inset | An inset border for a sunken control appearance. |
Outset | An outset border for a raised control appearance. |
Note |
|---|
This property will not render on some browsers. |
This example demonstrates how to use a Style object to change the style properties of multiple controls at once. Each time one of the Style property values changes, each control must call its ApplyStyle method. Note that not all the controls included support all the properties demonstrated. If a control does not support a particular property, the appearance of the control will not change when the property value is changed.
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