简体   繁体   中英

Issues when IE browser mode =11 and document mode=7

I have my application set to document mode=7 through webconfig. When this application is deployed in a windows server 2008 r2, and when i try to access it through internet, the document mode = 7 but my browser mode = 11. Most of the functionalities like sorting of ListView, selected change of checkbox is not working. When i change the browser mode to 7 using IE Explorer, it is functional. How can this be resolved?

You need to either set the X-UA-Compatible META tag like this:

<meta http-equiv="X-UA-Compatible" content="IE=7">

or add a custom header for X-UA-Compatible via IIS, the web.config or in C#:

HttpContext.Response.AddHeader("X-UA-Compatible", "IE-edge");

You can add the custom header in the web.config, see http://www.iis.net/configreference/system.webserver/httpprotocol/customheaders for help.

A word of advice, you need to take the time to upgrade the site to work with modern standards or you are going to lock yourself into a corner. IE 7 is almost a decade old, so consider that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM