Click here to Skip to main content
15,905,071 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to forcefully run the browser IE 11 in IE 8 mode?

I tried below code in Global.asax file.

C#
public void Application_EndRequest(object sender, EventArgs e)
    {
        //Send compatibility header if IE 11 is used
        if (Request.RawUrl.ToLower().Contains(".aspx") && Request.Browser.MajorVersion == 11)
        {
            Response.AddHeader("X-UA-Compatible", "IE=EmulateIE8");

            //Response.Write("TEST");
        }
    }


Also tried below way to set IE 11 Browser
XML
<httpProtocol>
     <customHeaders>
       <clear />
       <add name="X-UA-Compatible" value="IE=EmulateIE8" />
     </customHeaders>
   </httpProtocol>
Posted
Updated 25-Nov-15 2:41am
v2
Comments
Philippe Mori 18-Nov-15 12:56pm    
Fix your code to work with IE 11 and avoid such patches. That should be used only as a temporary solution if there are major problems.

1 solution

Hi,
You can Press F12 the set edge mode 8
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900