Webbrowser control: auto fill textfields
Posted
by Khou
on Stack Overflow
See other posts from Stack Overflow
or by Khou
Published on 2010-03-18T14:04:32Z
Indexed on
2010/03/18
18:41 UTC
Read the original article
Hit count: 794
I would like my custom browser to auto fill in a form when it is completely loaded
Ok so inside
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{ }
Ive inserted the following statements
webBrowser1.Document.GetElementById("FirstName").SetAttribute("value", "John");
webBrowser1.Document.GetElementById("LastName").SetAttribute("value", "Smith");
// etc..etc..
I noticed that "webBrowser1_DocumentCompleted" only is loaded one time?? How do i make my browser auto fill in a form when the document has finish loading, and auto fill the values to the define values if they have been changed by the end user.
© Stack Overflow or respective owner