开发者

WebBrowser control not navigating to links to "file://" protocol URIs

I am setting the DocumentText property to an HTML string that contains links like:

<a href="file:///D:/dir/file.html">NewPage</a>

The links are shown properly in the WebBrowser, but nothing happens when I click them. The Navigating, Navigated and Document开发者_运维技巧Complete events do not fire - nothing seems to happen at all.

AllowNavigation is true and other links using HTTP are working.

Any ideas please?


DocumentText was causing too many problems, so I implemented a tiny HTTP server which makes the WebBrowser control happy:

http://www.nickbutler.net/Article/WebBrowserEx

Nick

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜