I am trying to use the ASP:Menu control. It is rather simple. I want it Horizontal. Each of those first level items will have Sub items. I can get it Horizontal and when I hover over the Instant Reports or the Configurable Reports choice it seems to pop down a div or something but it is empty. I have tried formatting and everything I can think of as well as find on the internet. What am I doing wrong?
<asp:Menu ID="mnuChoices" runat="server" Orientation="Horizontal" DataSourceID="dsSiteMap"> </asp:Menu> <asp:SiteMapDataSource ID="dsSiteMap" runat="server" ShowStartingNode="false" />
Here is the sitemap file.
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode url="" title="MenuItems" description="">
<siteMapNode url="" title="Instant Reports" description="">
<siteMapNode url="" title="Current System Health" description="">
<siteMapNode url="~/ConfigurableReports/PropCredit30/TestLog.aspx" title="TEST" description=""></siteMapNode>
</siteMapNode>
<siteMapNode url="" title="Credit on Renewal" description="" />
</siteMapNode>
<siteMapNode url="" title="Configurable Reports" description="">
<siteMapNode url="~/ConfigurableReports/PropCredit30/AuditLog.aspx" title="Prop Credit 3 - Audit Log" description="" />
<siteMapNode url="~/ConfigurableReports/PropCredit30/ErrorLog.aspx" title="Prop Credit 3 - Failure Log" description="" />
</siteMapNode>
</siteMapNode>
This seems so easy. What am I missing?
TIA
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Sounds like a problem I had with Menu, but that only occurred in IE8… IE8 handled the z-index wrong. Simple to fix luckily:
<asp:Menu ID="mnuChoices" runat="server" Orientation="Horizontal"
DataSourceID="dsSiteMap">
<DynamicMenuStyle CssClass="submenu" />
</asp:Menu>
css:
.submenu {z-index: 9999; /* IE8 FIX for asp:Menu */}
Method 2
This should help:
http://weblogs.asp.net/bleroy/archive/2009/03/23/asp-menu-fix-for-ie8-problem-available.aspx
cheers
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0