Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Creating html from asp bulleted list in listitem

Reply
Thread Tools

Creating html from asp bulleted list in listitem

 
 
wilf
Guest
Posts: n/a
 
      09-20-2007
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?

 
Reply With Quote
 
 
 
 
Forum
Guest
Posts: n/a
 
      09-21-2007
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


"wilf" <> schreef in bericht
news: oups.com...
> 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?
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bulleted List question nina297 ASP .Net 1 03-22-2007 08:49 PM
<asp:ListItem Value="0">blank choice</asp:ListItem> ? Jim in Arizona ASP .Net 7 11-22-2006 08:31 AM
A bulleted list in an ASP.NET Texbox Dave Harrington ASP .Net Web Controls 1 04-05-2005 09:48 PM
ropdownlist listitem.value not working - returns listitem.text instead Mad Scientist Jr ASP .Net 2 06-29-2004 01:13 PM
How do Bulleted list? Woody Splawn ASP .Net 2 05-19-2004 10:23 PM



Advertisments