New Web Server Controls in ASP.Net 2.0
 
BulletedList Web Server Control
 
The BulletedList Web Server control generates an unordered or ordered (numbered) list of items, which provide as an HTML ul or ol element, respectively. You can specify the appearance of the items and of the bullets or numbers, define the list items statically or by binding the control to data, and you can respond to users' clicks on items.
 
The BulletedList originate from the same ListControl class as the ListBox, DropDownList, and other ASP.NET list controls, so using it is similar to working with those controls.
 
To define items for the BulletedList control, two properties are needed: the Text property and the Value property. The Text property describes what the control displays on the page. The Value property describes a second value that is not displayed but that you might want to return when a user selects an item.
 
Display Mode in List item
 
The BulletedList control can display list items as a Static text, HyperLink controls and LinkButton controls. The static text operates in non-interactive and HyperLink controls, LinkButton controls operate in interactive mode.
 
Response on User Selection
 
The postback fires the BulletedList control's Click event, where you can supply logic to perform application-specific tasks. The event passes to you the index number of the item that was clicked.
 
Syntax:
<asp:BulletedList id="MyBulletedList"
AutoPostBack="True|False"
CellPadding="InPixels"
RepeatDirection="Vertical|Horizontal"
RepeatLayout="Flow|Table"
TextAlign="Right|Left"
OnSelectedIndexChanged="OnSelectedIndexChangedMethod"
runat="server">
<asp:ListItem
Text="label"
Value="value" Selected="True|False" />
</asp: BulletedList>