asp.net.ph

BulletedListDisplayMode Enumeration

System.Web.UI.WebControls Namespace


.NET Framework version 2.0

Specifies the display behaviors you can apply to the list item contents in a BulletedList control.

Members


Member Name Description
HyperLink Displays the list item content as hyperlinks.
LinkButton Displays the list item content as link buttons.
Text Displays the list item content as text.

Remarks

The BulletedListDisplayMode enumeration represents the display behaviors that you can apply to the content of the list items in a BulletedList control.

The DisplayMode property uses these enumeration values to set the display behavior of the list item content in a BulletedList control.

When not specified, BulletedListDisplayMode defaults to the Text value, which displays the list item content as regular text with no additional functionality.

The HyperLink value displays list item content as hyperlinks which, when clicked, navigates to a URL. To specify the URL that a hyperlink navigates to, use the Value property.

The LinkButton value displays list item content as link buttons which, when clicked, posts the Web Form back to the server. In this case, the Value property can be used to associate a value for each list item that is passed on to the postback event handler.

To respond to the postback event, specify a handler for the Click event, using the event data of the BulletedListEventArgs class to determine the index of the link button in a BulletedList that the user clicked.

Example

The following example shows how to declaratively set the DisplayMode property of a BulletedList control at design time.

<asp:bulletedlist id = "bulletedList" runat = "server"
      bulletstyle = "disc"
      displaymode = "hyperlink"
      target = "_blank">
   <asp:listitem value = "http://www.microsoft.com">Microsoft</asp:listitem>
   <asp:listitem value = "http://www.asp.net">ASP.NET</asp:listitem>
   <asp:listitem value = "http://msdn.microsoft.com">MSDN</asp:listitem>
</asp:bulletedlist>

The following examples demonstrate using the DisplayMode property to specify the different display behaviors that can be applied to list items in a BulletedList control.

Adding BulletedList Items Declaratively
Run Sample | View Source
Dynamically Setting the BulletStyle Property of a BulletedList Control
Run Sample | View Source
Binding a BulletedList to a Data Source Control
Run Sample | View Source
See Also

BulletedList Class Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph