So I have an C# Form application that utilizes the web browser component. Apparently Response.Write(Request.Browser.Version.ToString()); returns "7.0" when I visit my test page from the web browser component.
How can I make this web browser component use IE8?
I did follow this and it was not working until I realized it was because I was debugging in visual studio.
On top of setting the registry for your application:
You should also set it for your debugging (visual studio hosted) application:
The answer may come late and might not apply to your case, but according to Ron's answer on the question WPF .net4 webBrowser and Internet Explorer 8, you can also control the web browser if you have control over the served page:
While this apparently does not change the user agent, it seems that conditionals like
and CSS
border-radius
are being evaluated properly, indicating that the newest engine (IE 9 on my system) is actually being used despite the user agent reporting MSIE 7.0.It appears you need to fiddle with the registry as per this article: -
http://blogs.msdn.com/ie/archive/2009/03/10/more-ie8-extensibility-improvements.aspx
To run a WebBrowser control in IE8 Standards Mode, use the following new value into the registry:
To run in IE7 Standards Mode, use the following registry value:
For IE8 RTM, we’ve added a new “forced” IE8 Standards Mode value. When an application opts into this mode, the Web Browser control will use the IE8 User-Agent string and Browser Emulation mode strictly. It will also ignore fallback features such as the built-in Compatibility View list and the user-generated Compatibility View list when loading pages. To run in “forced” IE8 Standards Mode, use the following registry value:
In all of these examples, “MyApplication.exe” refers to the name of your application.