Question about WebBrowser editing
-
I have an AxWebBrowser control displaying a certain page that has two input boxes. I want to Click a button on the form, and have values inserted into those two input boxes. How can I do that? Sammy "A good friend, is like a good book: the inside is better than the cover..."
-
I have an AxWebBrowser control displaying a certain page that has two input boxes. I want to Click a button on the form, and have values inserted into those two input boxes. How can I do that? Sammy "A good friend, is like a good book: the inside is better than the cover..."
If the button is in the web page, then just use embedded javascript in your page. If the button is in your Windows Form, get the
IHTMLDocument2
reference fromAxWebBrowser.Document
(the interface is defined in the Microsoft.mshtml.dll assembly which should be in your GAC when you install VS.NET, among other things). From that, you can enumerate the controls or get them by ID or NAME. Then just set theirinnerText
property or something along those lines.Microsoft MVP, Visual C# My Articles