IE has a Browser Mode and Document Mode and I can only seem to set the Document Mode programatically by adding this:
<meta http-equiv="X-UA-Compatible" content="IE=5" />
This sets Document Mode correctly for me, but I need the Browser Mode to change to Compatibility View. My site only works with these two settings this way. I've tried changing the DocType and other meta settings but nothing seems to work. I've also confirmed my IE settings under Tools->Compatibility Settings have all 3 check-boxes unchecked and nothing in the listbox.
My website is ASP.NET 2.0 running on IIS6 (Windows 2003 Server).
Here is a simple sample site that demonstrates this. Open this in IE10 and then look at the developer tools (F12):
<html>
<head>
<title>This is the title</title>
<meta http-equiv="X-UA-Compatible" content="IE=5" />
<script type="text/jscript" language="jscript">
function foo() {
alert("document.documentMode: " + document.documentMode +
"\n\rdocument.compatMode: " + document.compatMode +
"\n\rnavigator.userAgent: " + navigator.userAgent);
}
</script>
</head>
<body onload="javascript:foo();">
This is a test site
</body>
</html>