Reputation: 3965
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.
Upvotes: 3
Views: 1920
Reputation: 942256
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.
Upvotes: 2