Creating html from asp bulleted list in listitem

  • Thread starter Thread starter wilf
  • Start date Start date
W

wilf

Hello, I am trying to recreate some html using the bulleted list in
asp.net.

Here is the html:
<ul>
<li><a href="index.aspx"><span>Home</span></a></li>
</ul>

Here is the asp.net so far:
<asp:BulletedList ID="MainNavigation" runat="server"
DisplayMode="HyperLink" >
<asp:ListItem Value="index.aspx"><span>Home</span></asp:ListItem>
</asp:BulletedList>

But this does not work because the rendered page sends out:
<span>Home<span>

What is the correct way to do this?
 
Hi Wilfred,

Everything inside the listitem tags will be displayed as text. Place the
span, if you need it, around the bulletedlist.

Hope this helps.

Regards, Anita
 
Back
Top