asp:menu issue
-
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
-
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
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.
-
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.
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
-
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
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 -
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 -
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
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