Asp. NET browser definition file and IE compatibility mode

Source: Internet
Author: User

Due to a small bug in asp.net4.0, the callback of the ASP. WebForms control is not valid, and some controls are not available.

The workaround is to add a custom browser definition file to the project, refer to here: http://www.hanselman.com/blog/ Bugandfixaspnetfailstodetectie10causingdopostbackisundefinedjavascripterrorormaintainff5scrollbarposition.aspx

is to add IE.browser and firefox.browser two files under the App_Browsers of the project.

In addition, for the website to use IE8 document mode, to prevent the display problem in Ie10 or Ie11 browser, you can set the browser's document mode to IE8 through the program.

For an ASP. Web site, you can add a custom HTTP header as follows:

<?xml version= "1.0" encoding= "Utf-8"?><configuration>  <system.webServer>    < httpprotocol>      <customHeaders>        <clear/>        <add name= "x-ua-compatible" value= "ie= EmulateIE8 "/>      </customHeaders>    

Reference: http://msdn.microsoft.com/zh-cn/library/cc288325 (v=vs.85). aspx

Finish

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.