I've been trying to load a specific page on a web browser control that works fine with the installed IE on my system, but I keep getting a message box (created by the page) that I have to disable the compatibility view. The same page works fine on my IE 9.0 without tampering with the settings. I can't get it! The same thing happens if I use gecko and I can't figure out why... Is there any way to disable the settings programmatically?
Asked
Active
Viewed 9,281 times
2
-
http://stackoverflow.com/questions/18333459/c-sharp-webbrowser-ajax-call/20848398#20848398 has the programmatic code you desire, but by now no longer need. – Dirk Bester Dec 30 '13 at 23:27
3 Answers
3
I think this is what you need. There are other discussions about similar issues on SO here and here. I think the only way to change the settings programmatically would be to edit the registry with code.

Community
- 1
- 1

Nick Spreitzer
- 10,242
- 4
- 35
- 58
-
The first two links don't answer: "Why does it act differently in IE and the WebBrowser control?" The 3rd looks more promising (and perhaps is a "duplicate"). – May 30 '12 at 18:21
-
@pst, It attempts to answer the question "How do I disable compatibility mode for the webbrowser control." Is that not what the OP was after? – Nick Spreitzer May 30 '12 at 18:27
-
Thanks for the answer. I was hoping for a more programmatic solution, without registry or html changes. – pzogr May 30 '12 at 20:29
-
@user1426332, I can relate. I ran into a huge mess of unexpected compatibility problems on a recent project that used a WebBrowser control. Adding a registry key was the only solution I could find. :\ – Nick Spreitzer May 30 '12 at 20:39
1
Take a look at the this msdn article http://msdn.microsoft.com/en-us/library/cc288325%28v=vs.85%29.aspx
It should help with your problem

Stephan
- 591
- 5
- 18
-
This doesn't answer: "Why does it act differently in IE and the WebBrowser control?" – May 30 '12 at 18:21
-
1
You can set a META tag in your page that will force it to display in the format you want.
<meta http-equiv="X-UA-Compatible" content="IE=9" >
See this MSDN article for more info: http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx

Shawn Steward
- 6,773
- 3
- 24
- 45
-
`content="IE=Edge"` worked for me with being the first item inside – Thomas Weller Feb 24 '23 at 14:52