在IE 10中,如果检查开发人员工具,则可以看到浏览器有两种模式:
通过添加以下标签:
<meta http-equiv="X-UA-Compatible" content="IE=9" />
一个人可以强制IE10以IE9文档标准呈现页面。
ASP.Net是否可以强制浏览器更改浏览器模式以使用IE10兼容性 View 或任何更低版本的方法?
我有一个似乎与IE10兼容的应用程序,但是在IE10兼容性和IE较低版本的浏览器模式下尝试该应用程序时,该应用程序运行正常。
感谢任何帮助。
更新:
发布浏览器模式和文档模式的屏幕截图。
如果我在上面添加了元标记,则会得到:
请注意,文档模式处于meta标签中指定的IE9模式。
但是我的应用程序需要将浏览器模式(IE10)更改为IE10兼容模式或更低版本。使用当前的IE10模式,将中断应用程序。
最佳答案
I have an application that seems to break down with IE10, but trying the app in IE10 Compatibility > and IE lower versions Browser mode, the application works perfectly fine.
我的应用程式在IE10上无法正常运作,遇到类似的问题。我发现我的问题与无法识别最新IE的ASP.NET浏览器定义文件有关:
[来源:http://support.microsoft.com/kb/2600100]
By default, ASP.NET uses sniffing technology for the user agent string to detect browsers. The browser definition files cover a certain range of browser versions. However, as the version numbers increase, ASP.NET might not recognize new versions of a browser by using the user agent string. In this case, ASP.NET might handle these versions as an unknown browser.
修补程序的链接:
.NET 2.0 SP和.NET 3.5 SP1:http://support.microsoft.com/kb/2600100
.NET 4.0:http://support.microsoft.com/kb/2600088
关于asp.net - IE10的ASP.Net更改浏览器模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15300842/