Last post Jun 20, 2012 10:30 AM by colosso
Jun 20, 2012 02:09 AM|colosso|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:
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
Jun 20, 2012 02:18 AM|urenjoy|LINK
You can apply proper CSS or style to make submenu horizontal. Check following:
Jun 20, 2012 09:49 AM|atconway|LINK
So something like the following, would it work:
<asp:Menu ID="MasterMenu" runat="server" MaximumDynamicDisplayLevels="2" RenderingMode="Table">
<asp:MenuItem Text="HOME" Value="HOME">
<asp:MenuItem Text="submenu item 1" Value="1" />
<asp:MenuItem Text="SHOP" Value="SHOP">
<asp:MenuItem Text="submenu item 2" Value="1" />
<asp:MenuItem Text="CONTACT" Value="CONTACT">
<asp:MenuItem Text="submenu item 3" Value="1" />
Jun 20, 2012 10:30 AM|colosso|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