views:

65

answers:

2

is there a way that i can add tag in my .aspx page to Enable Compatibility View for Web sites by using Internet Explorer 8 ? without using click on "compatibility" icon on the browser?

+4  A: 

Include as the first thing inside <head>:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>

I'd strongly recommend fixing whatever site problems you have so the site works properly in IE8-native Standards Mode though. You will get a performance increase from running native in IE8, and even more so in IE9.

bobince
if i am using master pages; should i add tag in master pages content pages?
Abu Hamzah
If you want all those pages to use IE7-mode, then yes.
bobince
A: 

You can't actually enable "Compatibility View", but you can use various mechanisms to control the compatibility mode that IE uses to render the page (bobince's suggestion is one). I'd recommend reading: http://msdn.microsoft.com/en-us/library/cc288325%28v=VS.85%29.aspx

Coding Gorilla