BulletedListDisplayMode Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the display behaviors that you can apply to the list item contents in a BulletedList control.
public enum class BulletedListDisplayMode
public enum BulletedListDisplayMode
type BulletedListDisplayMode =
Public Enum BulletedListDisplayMode
- Inheritance
Fields
| Name | Value | Description |
|---|---|---|
| Text | 0 | Displays the list item content as text. |
| HyperLink | 1 | Displays the list item content as hyperlinks. |
| LinkButton | 2 | Displays the list item content as link buttons. |
Examples
The following code example demonstrates how to create a BulletedList control and set the DisplayMode property. A ListBox control is populated with the BulletedListDisplayMode values. The format of the list item content changes based on the display mode that the user selects from the list box.
<%@ Page Language="C#" %>
BulletStyle Example
<%@ Page Language="VB" %>
BulletStyle Example
Remarks
The BulletedListDisplayMode enumeration represents the display behaviors that you can apply to the content of the list items in a BulletedList control. The BulletedList.DisplayMode property uses these enumeration values to set the display behavior of the list item content in a BulletedList control. For example, if you set the BulletedList.DisplayMode property to the HyperLink value, the content of each list item in the BulletedList control renders as a hyperlink.
The Text value allows you to display the list item content as regular text with no additional functionality.
The HyperLink value allows you to display list item content as hyperlinks. When clicked, a hyperlink navigates to a URL. Use the ListItem.Value property to specify the URL that a hyperlink navigates to.
The LinkButton value allows you to display list item content as link buttons. Use the BulletedList.Click event to post back to the server when the user clicks a link button. Use the event data of the BulletedListEventArgs class to determine the index of the link button in a BulletedList that the user clicked.