In Asp.net, if the menu control is placed in masterpage, the second-level menu displayed in IE6 cannot be correctly displayed.

Source: Internet
Author: User

 

The following is the original text. I use the second method. Add only one row.CodeIt is simple and effective. The first method has not been tested. It is useless because it is worried that it will affect other tested functions.

 

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.