I have a similar application and I think that managing WebBrowser works very well. If you think what you need, I would for this and there are many other applications that do something like this. You can call Javascript functions on an HTML page with C # using HtmlDocument.InvokeScript() and C # from Javascript using window.external , and this two-way communication makes life simple.
Users do not need to install IIS because you are not using a web server, just displaying the content using HTML.
I would go for IE built-in control, not webkitdotnet, to be honest. Although WebKit itself is superior to IE, the webkitdotnet project in version 0.5 does not have C # and JavaScript or DOM access, and it seems difficult to tell if it is actively developing. It will be great if / when it gets the parity of characteristics, since IE is clearly far from perfect, but the advantage of the built-in IE control is that each user of your application will already be installed, and the WebBrowser control will be well tested. There are some flaws I found:
- The version of IE can vary from 6 to 9, so you should test to make sure your content works in everything (like with a website).
- There is an error in IE (at least up to 8) that relative links do not work in conjunction with
<base href="file://..."> . This may prevent you from using relative links in your local HTML documents. - Sometimes pages are displayed differently inside the WebBrowser control than from it. For example, http://bugs.jquery.com/ticket/7104 is one, and I came across another similar error affecting cufon.
- For compatibility reasons, even if your users install IE> 7, the WebBrowser control will still display your content in the default IE7 rendering mode. This is different from stand-alone IE, which by default works in standard mode, so it can catch you if you do not expect it. You can change this by adding the
<meta http-equiv="X-UA-Compatible" tag if you want, although I actually found this to make life easier, as it reduces the number of different versions that you should test.
source share