zoukankan      html  css  js  c++  java
  • 解决 asp.net 中如果 Menu 控件放在 MasterPage 中, IE6 会出现的二级菜单不能正确显示的问题

     

    以下是原文,我采用的是第二种方式,只加一行代码就能搞定,简单有效。第一种方式没有测试过,由于担心会影响到已测试过的其它功能,所以没有用。

     

    > A lot of users are finding that after moving their ASP.NET 1.1 site to ASP.NET 2.0 and then adding a Menu Control to their app, the Menu doesn't work.
    >
    > The reason this doesn't work is that an extra tag was added to web.config <xhtmlConformance mode="Legacy" /> This flag was meant for 2.0 to act a lot more like 1.1 and one of the major differences is the naming convention of controls. This naming change causes the quirky behavior with Menu in IE.
    >
    > There are 2 fixes for this issue:
    >
    > 1) Remove the xhtmlConformance tag from web.config
    > Personally if you can do it, I recommend this option. If you're using ASP.NET 2.0 features, you should try and stick with the new rendering modes.
    >
    > 2) If you can't do #1, then give your masterpage an ID
    > To do this, add a line to your Page_Load for your Masterpage:
    >
    > public partial class MasterPage : System.Web.UI.MasterPage
    > {
    > protected void Page_Load(object sender, EventArgs e)
    > {
    > this.ID = "Master1";
    > }
    > }

  • 相关阅读:
    Nhibernate对应关系参数介绍
    jquery mobile 登陆后页面验证
    jquery mobile radio,checkbox button 样式设置
    jquery mobile button样式设置
    Ext 三级联动 及附值
    store操作
    Javascript中try finally的细微差别
    mysql entity framework生成画面崩溃
    PYTHON推导生成
    PYTHON修饰器
  • 原文地址:https://www.cnblogs.com/verygis/p/1288379.html
Copyright © 2011-2022 走看看