Click here to Skip to main content
15,911,711 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi Guys,
I would like to know how I could insert values into text boxes in a html page and click a button using C#? Once I click the button I would be redirected to another page where I need to store the values on the new page into a text file. I need to repeat this process a lot of times.

Thanks!!
Posted
Comments
arathi_suresh 3-Sep-11 6:51am    
Please tell me what did u do?

1 solution

wbrowser is the web browser control where you need to navigate to the required page.
VB
HtmlElement obj;
obj = wbrowser.Document.GetElementById("fill_textbox");
obj.SetAttribute("value", "This is the content")
obj = wbrowser.Document.GetElementById("submit_button");
obj.InvokeMember("Click");
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900