Using Bulleted list to display a list of name's or HyperLink

Hi

Another new inclusion in the list of controls in asp.net is the Bulleted List control.

Lets say if we want to show the list of values (For me a good use was to view all the values from the word file for Autosuggest Box), this control will be of great use. You can also format the bullets. To specify individual items that we want to appear in the list we can use the List Item tag also.

BulletedList controls can display list of items with a variety of bullet styles. Use the

BulletedList.BulletSyle property to control the style of the bulleted list.

Here is an example of Bulleted List control

<asp:BulletedList ID=BulletedList1 BulletStyle="Circle" runat=server>
         <asp:ListItem>Vikram #1<//asp:ListItem>
         <asp:ListItem> Vikram #2<//asp:ListItem>
         <asp:ListItem> Vikram #3<//asp:ListItem>
<//asp:BulletedList>

The bulleted list can also render a list of Hyperlinks. Use the following code to show a list of Hyperlink

<asp:BulletedList DisplayMode = HyperLink runat=server>
   <asp:ListItem Value="www.vikramlakhotia.com">Vikram<//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>

Hope this helps
Thanks
Vikram


Share this post   Email it

Feedback

Please post your comments:

Name:  
Email (optional): Your email address will not be posted.
URL (optional):
Comments: HTML will be ignored, URLs will be converted to hyperlinks  
Enter the text you see in the box:
 

Copyright © 2006 - 2012 Vikram Lakhotia