ASP.NET DisplayMode Property

Definition and Usage

The DisplayMode property is used to set or return the type of list displayed.

Syntax

<asp:BulletedList DisplayMode="mode" runat="server">
some content
</asp:BulletedList>
Property Description
mode

Specifies the display mode of the list item.

Possible values:

  • Text - Default. Standard text
  • HyperLink - Hyperlink
  • LinkButton - Hyperlink Button

Example

The following example sets the DisplayMode of the BulletedList control:

<form runat="server">
<asp:Bulletedlist DisplayMode="HyperLink" id="bl1" runat="server">
<asp:ListItem Text="W3School" Value="http://www.codew3c.com/" />
</asp:Bulletedlist>
</form>

Example

Set the DisplayMode of RadioButtonList Control