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";
    > }
    > }

  • 相关阅读:
    CF375D Tree and Queries
    进制转换
    贪心问题
    next_permutation函数
    C++ STL
    一些排序总结
    KMP算法
    围圈报数
    车辆调度—模拟栈的操作
    搜索题
  • 原文地址:https://www.cnblogs.com/verygis/p/1288379.html
Copyright © 2011-2022 走看看