How to force a IE version in a Winform WebControl?
Asked Answered
U

2

3

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?

Unlookedfor answered 8/2, 2011 at 10:4 Comment(1)
Looks like it loaded it in compatibility mode to me.Freeholder
C
6

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?

Corina answered 21/9, 2011 at 11:29 Comment(1)
great catch ... I hope not to find problems with the proxy as many companies use it.Unlookedfor
P
0

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. :)

Philippians answered 8/2, 2011 at 11:5 Comment(1)
nice link :) will give that a tryUnlookedfor

© 2022 - 2024 — McMap. All rights reserved.