ASP.Net菜单控制 - 水平 - 不显示子选项 [英] ASP.Net Menu Control - Horizontal - Not Showing Sub Options

查看:176
本文介绍了ASP.Net菜单控制 - 水平 - 不显示子选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用ASP:菜单控制。这是相当简单的。我想它的水平。每个这样的第一级项目将分项目。我能得到它的水平,当我将鼠标悬停在即时报告配置的报告的选择,它似乎突然下来一个div或东西,但它是空的。我试图格式化和一切我能想到的,以及在互联网上找到。我在做什么错了?

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" />

下面是网站地图文件。

<?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

推荐答案

听起来像是一个问题,我与菜单,但只发生在IE8 ... IE8处理的z-index的错误。简单修复幸运:

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 */}

这篇关于ASP.Net菜单控制 - 水平 - 不显示子选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆