SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2010
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding a Menu in ASP.net

    I want to add a menu to the left of the body in an ASP.net site.

    I have added to site.css to give the menu framework.

    I an just having a little trouble with the text placement because "MenuContent" is not a valid ID:

    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    </asp:Content>
    <asp:Content ID="MenuContent" runat="server" ContentPlaceHolderID="MenuContent">
    <div id = "div.menu"><ul>
    <li>Help Sites
    <ul>
    <li><a href="http://www.google.com">Google</a><li>
    <li><a href="http://en.wikipedia.org/wiki/Wiki">Wiki</a></li>
    </ul>
    </li>
    </ul></div>
    </asp:Content>
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    ...
    </asp:Content>

  2. #2
    SitePoint Zealot
    Join Date
    Sep 2010
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found the Menu in Site.Master and am manipulating it thru site.css.

    I have a simple question. How do you "return" after each MenuItem? I tried <br /> but that did not work.

    <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"></asp:MenuItem><br />
    <asp:MenuItem NavigateUrl="~/About.aspx" Text="About"></asp:MenuItem>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •