System.Web.UI.WebControls Namespace
.NET Framework version 2.0
Creates a control that generates a list of items in a bulleted format.
Visibility |
Name |
Value Type |
Accessibility |
public |
AutoPostBack
|
Boolean |
[ Get , Set ] |
public |
BulletImageUrl
|
String |
[ Get , Set ] |
public |
BulletStyle
|
BulletStyle |
[ Get , Set ] |
public |
Controls
|
ControlCollection |
[ Get ] |
public |
DisplayMode
|
BulletedListDisplayMode |
[ Get , Set ] |
public |
FirstBulletNumber
|
Int32 |
[ Get , Set ] |
public |
RenderWhenDataEmpty
|
Boolean |
[ Get , Set ] |
public |
SelectedIndex
|
Int32 |
[ Get , Set ] |
public |
SelectedItem
|
ListItem |
[ Get ] |
public |
SelectedValue
|
String |
[ Get , Set ] |
public |
Target
|
String |
[ Get , Set ] |
public |
Text
|
String |
[ Get , Set ] |
|
Use the BulletedList control to create a list of items that are formatted with bullets.
To specify the individual list items that you want to appear in a BulletedList control, place a ListItem object for each entry between the opening and closing tags of the BulletedList control.
To specify the bullet type to use to display list items in a BulletedList control, set the BulletStyle property to one of the bullet types that are defined by the BulletStyle enumeration. The following table lists the available bullet styles.
Bullet Style |
Description |
NotSet |
Not set. |
Numbered |
A number. |
LowerAlpha |
A lowercase letter. |
UpperAlpha |
An uppercase letter. |
LowerRoman |
A lowercase Roman numeral. |
UpperRoman |
An uppercase Roman numeral. |
Disc |
A filled circle. |
Circle |
An empty circle. |
Square |
A filled square. |
CustomImage |
A custom image. |
Use the FirstBulletNumber property to specify the value that starts the numbering of list items in an ordered BulletedList control. The value that is assigned to the FirstBulletNumber property is ignored, if the BulletStyle property is set to the Disc, Square, Circle, or CustomImage field. If you set the BulletStyle property to the value of CustomImage to specify a custom image for the bullet, you must set the BulletImageUrl property also to specify the location of the image file.
To specify the display behavior of the list items in a BulletedList, set the DisplayMode property to one of the values that are defined by the BulletedListDisplayMode enumeration. The defined display behaviors are Text, HyperLink, and LinkButton.
When a hyperlink is clicked, it navigates to a URL. Use the Value property to specify the URL that a hyperlink navigates to. Use the Target property to specify the frame or window that displays the Web page that is navigated to when a hyperlink is clicked.
When the DisplayMode property is set to LinkButton, the BulletedList control displays list items as links that post back to the server when clicked. To programmatically control the actions that are performed when a link button is clicked, provide an event handler for the Click event. Note that the SelectedIndex and SelectedItem properties are inherited from the ListControl class and are not applicable to the BulletedList control. Use the event data of the BulletedListEventArgs class to determine the index of the link button in a BulletedList that was clicked.
The BulletedList control also supports data binding. To bind the BulletedList to a data source, you can use any of the provided data-binding mechanisms.
For examples illustrating use of this control, see the individual member types of this class. For syntax information, see BulletedList in ASP.NET Syntax for Web Controls.
BulletedList Web Server Control