ASP.NET Compatibility mode in IE 9 - asp.net

I have on eproblem with IE Compatibility...
for example my site in Compatibility mode which is equivalent to IE 7 has broken...
a will show you 2 screen-shoots:
IE 9 (normal view) - http://screencast.com/t/ysNYN3RJh
IE 9 (Compatibility IE 7 view) - http://screencast.com/t/7X4lR5bNyDhs
in my site i have this meta - <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
but i think it doesn't work properly...
so, how can i fix this problem?
also i tried insert the code <httpProtocol>
<customHeaders>
<!-- IE7 COPABILITY -->
<clear />
<add name="X-UA-Compatible" value="IE=Edge" />
<!-- IE7 COPABILITY -->
</customHeaders>
</httpProtocol> in Web.config
but it also was ignored...
P.S sorry for bad English

Your question is horrifyingly unclear.
X-UA-Compatible doesn't disable compatibility mode; it just prevents it from defaulting to compatibility mode.
It looks like you need an HTML5 shiv for styling HTML5 elements in IE < 9.

Related

ASP.NET Change IE document mode?

I've got a problem with an ASP.NET project. It uses .NET Framework 2 (old I know but can't update for other reasons) and when you open the site in Internet Explorer there are some bullet points which do not show. Set-up like:
<ul class="abc"><li>Bullet point 1</li></ul>
However when I open Internet Explorer developer tools by pressing F12 I can change the document mode from "Internet Explorer 7 Standards (Page Default)" to "Internet Explorer 8 Standards" the bullet points show correctly.
How can I change my solution so that all pages are set to use the Internet Explorer 8 standards by default?
Either simply just use <!DOCTYPE html>, or add this to your Web.config:
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="IE=Edge,chrome=1" />
</customHeaders>
</httpProtocol>
</system.webServer>
You can also use <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" /> instead of a header, but it causes page redrawing.
Check the doctype. If I remember correctly the XHTML 1.0 strict doctype will enforce IE 7 mode. Also, you can use the X-UA compatible meta tag like so to put it in IE-9 mode: . Essentially, this isn't a function of ASP.Net at all. Your browser determines what engine to use first by your doctype then second by any over-riding features you've told it to use such as X-UA.
More information can be found at: https://msdn.microsoft.com/en-us/library/jj676915%28v=vs.85%29.aspx
The key point to remember with using X-UA is that it must be the very first tag in your . If you put it second it won't work.
Adding this under the DOCTYPE worked.
<meta http-equiv="x-ua-compatible" content="IE=Edge" >
It did not work when that was between the head tags. You can changed edge to 7/8/9 etc to suit.
Haven't tried but you need to have DOCTYPE such as <!DOCTYPE html>

IE 11 backward compatibility

I just added the following meta tag to all my jsp's to force render in the highest possible document mode for the browser.
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
It works fine in IE 11. but the struts 2 application gets buggy in previous IE version i.e. IE 10 and IE 8. Many of the alignments are wrong. Unnecessary scrollbars.
The reason i added this meta tag was the application was loading in IE 7 document mode when deployed on a unix box, But it worked fine in my local deployment.
How to achieve compatibility in all IE browser versions.

Issues with IE compatibility mode and bootstrap

I have huge issue with Twitter Bootstrap and IE 9. Can I force IE 9 to turn off compatibility mode because my website is falling apart with compatibility mode turned on.
Any help? Thanks a lot.
http://tinyurl.com/k5ylsad
Already answered at Force IE compatibility mode off using tags
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Also, make sure this is the FIRST meta tag.

Unable to resolve IE rendering issues

First site i've built that get's this borked in IE9-older. Compatibility mode not helping. My employer shop is all mac, and the few PCs I tested on are rendering fine, but the client is running IE9, and it's not loading right. I tried on an old PC in the shipping dept running IE6 & similar borked result.
Been trying for hours to fix this site before it goes live on customer's domain. Staged at: http://hjshopper.com/littfin.temp/index.php
If anyone has any suggestions, I'd really appreciate it as i'm at a loss.
[UPDATE] So I've figured out most of the issues. Basically i'm a newb who was using html5 tags(header, section, etc) that old IE didn't like(so obvious now). Changing them to div with classes etc solved 90% of the problems. No i just have to figure out the IE Z-index bug that is preventing the drop menu from showing on top of the main content.
I opened your site in IE 9 (on windows 7) and it worked fine but if I turn on the "Compatibility mode" of the browser the site renders wrong. In that case you have 2 options:
- Tell the users to disable the compatibily mode.
- Add this tag to your site head: . It forces the browser to use the latest rendering engine that is available despite what the user configures (maybe selecting standards to IE 8 or 7, or enabling the compatibility mode). Hope that helps.
what about targeting just IE with a extra css, that is the better way around
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="all_ie_sucks.css" />
<![endif]-->
and for IE 8 and 9
<!--[if gte IE 8]>
<link rel="stylesheet" type="text/css" href="get_real_browser.css" />
<![endif]-->
this will do the trick..
and since you also need something for really old browser such IE this will do::
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="ie6-really.css" />
<![endif]-->
But note that will be only for IE 6, if you want to target all browsers above IE6 this is the one you may want
<!--[if gte IE 6]>
<link rel="stylesheet" type="text/css" href="ie6-and-rest-old-stuff.css" />
<![endif]-->
but i would create one for each of them, since they all render stuff differently..

compatibility issue is IE10

I have an asp.net website that looks good, as it should, on IE8,IE9 as well as the latest versions of Firefox and Chrome.
the server click is working fine in all web browsers..
in IE10 it's not working..when Clicking IE10's "Compatibility button" its work fine..
but I can't tell all users to turn on compatibility button and browse.
I want to do dis in coding side..
I have tried
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
and
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=EmulateIE7" />
</customHeaders>
</httpProtocol>
</system.webServer>
and this also
try dis also
I've tried overriding the compatibility mode, to no avail:
but it's not working in IE10.
this works for me
<head runat="server">
<meta id="FirstCtrlID" runat="server" http-equiv="X-UA-Compatible" content="IE=8" />
</head>
Try
<meta http-equiv="X-UA-Compatible" content="IE=edge">
IE compatibility meta tags have been described in detail by this answer in the answer to the following question What does <meta http-equiv="X-UA-Compatible" content="IE=edge"> do?
Just try this
<meta http-equiv="X-UA-Compatible" content="IE=8, IE=9, IE=10, IE=Edge" />
here IE=Edge is to mean highest compatibility. but for your problem IE=10 will be the fix.

Resources