Wednesday, May 28, 2014

How to set the default IE Compatibility Mode from Asp.Net Website

Step 1:- Add the tag in all pages and login page and Master Page

<meta http-equiv="x-ua-compatible" content="ie=8">

You Have to change based of which version you want
content="ie=8"> for IE 8
content="ie=9"> for IE 9
<head runat="server">
    <title></title>
    <meta http-equiv="x-ua-compatible" content="ie=8">
</head>

Step 2:- Add this code in the webconfig file
<configuration>

 <system.webServer>
   
    <httpProtocol>
     
      <customHeaders>
        <clear />
        <add name="X-UA-Compatible" value="IE=IE8" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>


Step 3:- Run the Project and check 

No comments:

Post a Comment