Creating html from asp bulleted list in listitem

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?
 
F

Forum

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top