Creating html from asp bulleted list in listitem

Discussion in 'ASP .Net' started by wilf, Sep 20, 2007.

  1. wilf

    wilf Guest

    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?
    wilf, Sep 20, 2007
    #1
    1. Advertising

  2. wilf

    Forum Guest

    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:...
    > 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?
    >
    Forum, Sep 21, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Woody Splawn

    How do Bulleted list?

    Woody Splawn, May 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    492
    Scott Mitchell [MVP]
    May 19, 2004
  2. Mad Scientist Jr
    Replies:
    2
    Views:
    447
    Mad Scientist Jr
    Jun 29, 2004
  3. Jim in Arizona
    Replies:
    7
    Views:
    922
    Badass Scotsman
    Nov 22, 2006
  4. nina297

    Bulleted List question

    nina297, Mar 22, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    414
    Alexey Smirnov
    Mar 22, 2007
  5. Dave Harrington

    A bulleted list in an ASP.NET Texbox

    Dave Harrington, Apr 5, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    213
    Steve C. Orr [MVP, MCSD]
    Apr 5, 2005
Loading...

Share This Page