How to force a IE version in a Winform WebControl?

5.2k Views Asked by At

I was trying to find out the problem in one web design I had and remembered to use a simple javascript to get the browser version as I had completly 2 different behaviors

so I add this:

<div id="example"></div>

<script type="text/javascript">

txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
txt+= "<p>Browser Name: " + navigator.appName + "</p>";
txt+= "<p>Browser Version: " + navigator.appVersion + "</p>";
txt+= "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt+= "<p>Platform: " + navigator.platform + "</p>";
txt+= "<p>User-agent header: " + navigator.userAgent + "</p>";

document.getElementById("example").innerHTML=txt;

</script>

and found out this:

enter image description here

original image

even though I have Internet Explorer 8 installed on this machine, the webbrowser control loads a version of IE (Internet Explorer 7) that is not the one installed.

How can I force using the correct version?

2

There are 2 best solutions below

1
On BEST ANSWER

Actually it is possible to force the control to use particular version of IE. Have a look at this article: Witch version of browser is used by the WebBrowser control?

1
On

I don't think it's possible to do that. One option is to embed WebKit into your app: http://sourceforge.net/projects/webkitdotnet/

This will make your install a lot bigger, but at least you'll have embedded a competent browser. :)