Problem with WebBrowser control
I am trying to retrieve data from a page which first requires to log on, I am using a WebControl on a WinForms app, and when I try to log on an error pops up telling me "Object doesn't support this property or method" in a .js file at certain line, the method being called is
window.external.AutoCompleteSaveForm
which I have no Idea what it does. the webBrowser.ObjectForScripting
is set to this
I think the problem is the ObjectForScripting, but I don't really know which Object supports this method.
thanks in advance.
You are right, you must provide an object for ObjectForScripting. It could be anything, as long as it has the [ComVisible(true)] attribute so it is callable from COM code. To keep the script happy, you must provide a public AutoCompleteSaveForm(object) method. No need to do anything. The MSDN library article has a decent example.
链接地址: http://www.djcxy.com/p/41824.html上一篇: 在WebBrowser控件中禁用JavaScript错误
下一篇: WebBrowser控件的问题