Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. asp:menu issue

asp:menu issue

Scheduled Pinned Locked Moved ASP.NET
javascriptsysadminhelptutorial
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    THE SK
    wrote on last edited by
    #1

    Hi All I want to add a menu somewhat like that of codeproject(see above the green horizontal div) Home Articles Quick Answers etc I was using asp:menu <asp:menu id="NavigationMenu" staticdisplaylevels="2" staticsubmenuindent="10" orientation="Vertical" target="_blank" runat="server" > <DynamicMenuItemStyle BackColor="Aqua" Font-Bold="true" /> <dynamichoverstyle backcolor="Green" forecolor="Black"/> <items> <asp:menuitem navigateurl="Home.aspx" text="Home" tooltip="Home"> <asp:menuitem navigateurl="Music.aspx" text="Music" tooltip="Music"> <asp:menuitem navigateurl="Classical.aspx" text="Classical" tooltip="Classical"/> <asp:menuitem navigateurl="Rock.aspx" text="Rock" tooltip="Rock"/> <asp:menuitem navigateurl="Jazz.aspx" text="Jazz" tooltip="Jazz"/> </asp:menuitem> <asp:menuitem navigateurl="Movies.aspx" text="Movies" tooltip="Movies"> <asp:menuitem navigateurl="Action.aspx" text="Action" tooltip="Action"/> <asp:menuitem navigateurl="Drama.aspx" text="Drama" tooltip="Drama"/> <asp:menuitem navigateurl="Musical.aspx" text="Musical" tooltip="Musical"/> </asp:menuitem> </asp:menuitem> </items> </asp:menu> But I have seen that if I disable javascript on my browser asp:menu doesnot work. However codeproject menu works even after disabling the javascript. Please guide which control is the codeproject using for menu.I want to use the same Thanks Regards Sandeep

    A 1 Reply Last reply
    0
    • T THE SK

      Hi All I want to add a menu somewhat like that of codeproject(see above the green horizontal div) Home Articles Quick Answers etc I was using asp:menu <asp:menu id="NavigationMenu" staticdisplaylevels="2" staticsubmenuindent="10" orientation="Vertical" target="_blank" runat="server" > <DynamicMenuItemStyle BackColor="Aqua" Font-Bold="true" /> <dynamichoverstyle backcolor="Green" forecolor="Black"/> <items> <asp:menuitem navigateurl="Home.aspx" text="Home" tooltip="Home"> <asp:menuitem navigateurl="Music.aspx" text="Music" tooltip="Music"> <asp:menuitem navigateurl="Classical.aspx" text="Classical" tooltip="Classical"/> <asp:menuitem navigateurl="Rock.aspx" text="Rock" tooltip="Rock"/> <asp:menuitem navigateurl="Jazz.aspx" text="Jazz" tooltip="Jazz"/> </asp:menuitem> <asp:menuitem navigateurl="Movies.aspx" text="Movies" tooltip="Movies"> <asp:menuitem navigateurl="Action.aspx" text="Action" tooltip="Action"/> <asp:menuitem navigateurl="Drama.aspx" text="Drama" tooltip="Drama"/> <asp:menuitem navigateurl="Musical.aspx" text="Musical" tooltip="Musical"/> </asp:menuitem> </asp:menuitem> </items> </asp:menu> But I have seen that if I disable javascript on my browser asp:menu doesnot work. However codeproject menu works even after disabling the javascript. Please guide which control is the codeproject using for menu.I want to use the same Thanks Regards Sandeep

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      I will suggest you to go for CSS Friendly Menu Adapter. That will resolve your issue. http://www.asp.net/CssAdapters/[^]

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

      T 1 Reply Last reply
      0
      • A Abhijit Jana

        I will suggest you to go for CSS Friendly Menu Adapter. That will resolve your issue. http://www.asp.net/CssAdapters/[^]

        Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

        T Offline
        T Offline
        THE SK
        wrote on last edited by
        #3

        Abhijit thanks for your answer Does the menu on the codeproject site is implemented in the same way? After disabling the javascript would cssadapters will work? The codeproject menu works even after disabling javascript on the browser. Thanks Regards Sandeep

        A 1 Reply Last reply
        0
        • T THE SK

          Abhijit thanks for your answer Does the menu on the codeproject site is implemented in the same way? After disabling the javascript would cssadapters will work? The codeproject menu works even after disabling javascript on the browser. Thanks Regards Sandeep

          A Offline
          A Offline
          Abhishek Sur
          wrote on last edited by
          #4

          simple CSS fixes will do this.. Say in codeproject the Menu structure is like this :

          <ul class="nav" >
          <li ><a href="#">Home</a></li>
          <ul style="display:none;">
          <li ><a href="#">ASP.NET</a></li></ul>
          </ul>

          Now on

          #nav a:hover >ul
          {
          //css to display
          }

          You can apply these sort of simple CSS to show / hide menu items which will not be dependent on Javascript as with Codeproject. :)

          Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


          My Latest Articles-->** Windows7 API Code Pack
          Simplify Code Using NDepend
          Basics of Bing Search API using .NET

          T 1 Reply Last reply
          0
          • A Abhishek Sur

            simple CSS fixes will do this.. Say in codeproject the Menu structure is like this :

            <ul class="nav" >
            <li ><a href="#">Home</a></li>
            <ul style="display:none;">
            <li ><a href="#">ASP.NET</a></li></ul>
            </ul>

            Now on

            #nav a:hover >ul
            {
            //css to display
            }

            You can apply these sort of simple CSS to show / hide menu items which will not be dependent on Javascript as with Codeproject. :)

            Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


            My Latest Articles-->** Windows7 API Code Pack
            Simplify Code Using NDepend
            Basics of Bing Search API using .NET

            T Offline
            T Offline
            THE SK
            wrote on last edited by
            #5

            Thanks Abhishek Now got the right answer . But please tell me what the following css code do #nav a:hover >ul { //css to display } Thanks Regards Sandeep

            A 1 Reply Last reply
            0
            • T THE SK

              Thanks Abhishek Now got the right answer . But please tell me what the following css code do #nav a:hover >ul { //css to display } Thanks Regards Sandeep

              A Offline
              A Offline
              Abhishek Sur
              wrote on last edited by
              #6

              This is actually a Combined selector of CSS, means you are going to the first ul under the anchor(a) tag. Why dont you learn CSS from here : http://www.w3schools.com/Css/default.asp[^] I hope this would definitely benefit you while writing CSS menu. Cheers. :thumbsup:

              Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


              My Latest Articles-->** Windows7 API Code Pack
              Simplify Code Using NDepend
              Basics of Bing Search API using .NET

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups