This documentation is archived and is not being maintained.

Style::BorderStyle Property

Gets or sets the border style of the Web server control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
property BorderStyle BorderStyle {
	BorderStyle get ();
	void set (BorderStyle value);
}

Property Value

Type: System.Web.UI.WebControls::BorderStyle
One of the BorderStyle enumeration values. The default is NotSet.

ExceptionCondition
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.

NoteNote:

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.

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.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

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