We have a VB.Net app that has several editable reports and forms in html/javascript. I'm using the standard WebBrowser control.
We're accessing the content via filepath, since using \localhost\sharename when the machine is offline doesn't work even though the content is on the machine. The problem with that is that then it's running in the local machine zone, and you get the warning about running ActiveX controls (even if that's set to 'allow' in the options menu on IE).
So I'm using Mark of the Web to act as if the content is saved from localhost. I appended it with the requisite vbCrLf to the start of the HTML page that's being dynamically written every time a link is clicked. When I open开发者_运维百科 the resulting page in IE, I no longer get the ActiveX warning, and everything works. However, when I use WebBrowser.Navigate to that filepath, I still get the warning. Any idea how to get rid of that?
try by Setting the property ScriptErrorsSuppressed of webbrowser to true, i think that will solve you problem.
精彩评论