c# - Select specific text boxes on WebBrowser and write in them -


how select specific text box on web browser (the default c# webbrowser) , write string in it? have been thinking of webrequests may illegal due amount of packets send host server.

if wanting fill in field, need use dom. here examples assume browser named browser , has navigated google.com.

wpf

     mshtml.ihtmldocument2 htmldoc = browser.document mshtml.ihtmldocument2;      ((mshtml.htmlinputelement)htmldoc.all.item("lst-ib")).value = "wpf web browser access dom"; 

winforms

     htmldocument htmldoc = browser.document;      htmldoc.all["lst-ib"].innertext = "c# web browser access dom"; 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -