Hello. I'm still a beginner in ASP.NET but I was looking for a solution to this problems for several days now and I couldn't find something really helpful.
I have following problem:
I have to make a ASP.NET Webapplication with a two-row menu. It should look like that:
http://jsfiddle.net/J7uSY/1/
Each topmenu item should have multiple submenu items which should be shown in the row below after clicking on the topmenu item. The whole menu should be in the Site.Master but I think that is not relevant.
I tried to do it with only one .NET Menu Control but I couldn't find a way to style the menu statically with two rows.
My second idea was to use multiple .NET Menu Controls and hide/show them by codebhind after a click. Unfortunately this wouldn't be good for SEO because the bots cant find the whole menu structure anymore...
My question is now: What is the smartest way to do that? Can you give me some advice or solutions for this problem?
Unfortunately the sumbenu items are shown while hovering over the topmenu item and not after clicking on it... But with some css definitions after a click in code behind I think that could work :) Thank you
colosso
0 Points
2 Posts
Menu in ASP.NET Webapplication
Jun 20, 2012 06:09 AM|LINK
Hello. I'm still a beginner in ASP.NET but I was looking for a solution to this problems for several days now and I couldn't find something really helpful.
I have following problem:
I have to make a ASP.NET Webapplication with a two-row menu. It should look like that:
http://jsfiddle.net/J7uSY/1/
Each topmenu item should have multiple submenu items which should be shown in the row below after clicking on the topmenu item. The whole menu should be in the Site.Master but I think that is not relevant.
I tried to do it with only one .NET Menu Control but I couldn't find a way to style the menu statically with two rows.
My second idea was to use multiple .NET Menu Controls and hide/show them by codebhind after a click. Unfortunately this wouldn't be good for SEO because the bots cant find the whole menu structure anymore...
My question is now: What is the smartest way to do that? Can you give me some advice or solutions for this problem?
Thanks and regards
urenjoy
Star
12171 Points
1824 Posts
Re: Menu in ASP.NET Webapplication
Jun 20, 2012 06:18 AM|LINK
You can apply proper CSS or style to make submenu horizontal. Check following:
http://www.codeproject.com/Articles/112228/Horizontal-Submenu-with-Horizontal-Menu-using-CSS
atconway
All-Star
16846 Points
2756 Posts
Re: Menu in ASP.NET Webapplication
Jun 20, 2012 01:49 PM|LINK
So something like the following, would it work:
<asp:Menu ID="MasterMenu" runat="server" MaximumDynamicDisplayLevels="2" RenderingMode="Table"> <Items> <asp:MenuItem Text="HOME" Value="HOME"> <asp:MenuItem Text="submenu item 1" Value="1" /> </asp:MenuItem> <asp:MenuItem Text="SHOP" Value="SHOP"> <asp:MenuItem Text="submenu item 2" Value="1" /> </asp:MenuItem> <asp:MenuItem Text="CONTACT" Value="CONTACT"> <asp:MenuItem Text="submenu item 3" Value="1" /> </asp:MenuItem> </Items> </asp:Menu>colosso
0 Points
2 Posts
Re: Menu in ASP.NET Webapplication
Jun 20, 2012 02:30 PM|LINK
Unfortunately the sumbenu items are shown while hovering over the topmenu item and not after clicking on it... But with some css definitions after a click in code behind I think that could work :) Thank you