This documentation is archived and is not being maintained.

BulletedList::DisplayMode Property

Gets or sets the display mode of the list content in a BulletedList control.

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

public:
virtual property BulletedListDisplayMode DisplayMode {
	BulletedListDisplayMode get ();
	void set (BulletedListDisplayMode value);
}
<asp:BulletedList DisplayMode="BulletedListDisplayMode" />

Property Value

Type: System.Web.UI.WebControls::BulletedListDisplayMode
One of the BulletedListDisplayMode values. The default is Text.

ExceptionCondition
ArgumentOutOfRangeException

The specified type is not one of the BulletedListDisplayMode values.

Use the DisplayMode property to specify the display behavior to apply to the content of list items in a BulletedList control. The DisplayMode property is set using one of the BulletedListDisplayMode enumeration values. The following table lists the possible values.

Value

Displayed as

Text

Text.

HyperLink

Hyperlinks.

LinkButton

Link buttons.

The HyperLink value allows you to display list content as hyperlinks. When clicked, a hyperlink navigates to a URL. Use the Value property to specify the URL that a hyperlink navigates to.

The LinkButton field allows you to display list content as links. Use the BulletedList::Click event to post back to the server when a link button is clicked.

The value of this property is stored in view state.

The following code example demonstrates how to create a BulletedList control and set the DisplayMode property. A ListBox control is populated with the BulletedListDisplayMode enumeration values. The format of the list item content changes based on the display mode that the user selects from the list box.

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

.NET Framework

Supported in: 4, 3.5, 3.0, 2.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.
Show: