WebPartZoneBase.BorderWidth Property

Gets or sets the width of the border that surrounds a WebPartZoneBase control.

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

public:
virtual property Unit BorderWidth {
	Unit get () override;
	void set (Unit value) override;
}
/** @property */
public Unit get_BorderWidth ()

/** @property */
public void set_BorderWidth (Unit value)

public override function get BorderWidth () : Unit

public override function set BorderWidth (value : Unit)

Not applicable.

Property Value

The width in the specified Unit of the border that surrounds a zone. The default is 1.

The base BorderWidth property is overridden by the WebPartZoneBase class to set the default border width for zones.

You can set the BorderWidth property for a WebPartZoneBase control either declaratively or programmatically. The border appears only when the zone is in a page display mode in which WebPartZoneBase class user interface (UI) features are visible, such as EditDisplayMode or DesignDisplayMode.

The following code example demonstrates the declarative use of the BorderWidth property on a WebPartZone control. For the full code example, including the code-behind source file and the .aspx page that contains the zone in this code, see the WebPartZoneBase class overview.

Notice that the BorderWidth attribute value is set to a specific width in pixels. After you load the page into a browser and switch the page into design display mode, you can see the effect of the property.

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

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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: