.Net透過Web.Config設定IE相容性檢視
在Web.Config <configuration>區塊加入以下描述,可使IE自動相容性檢視,不必另外再設定。
經測試IE10自動相容成功、IE11自動相容失敗。
<httpProtocol>
<customHeaders>
<!--加入相容性設定-->
<add name="X-UA-Compatible" value="IE=EmulateIE7"/>
</customHeaders>
</httpProtocol>
效果等同於在HTML Meta加入以下描述
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">