Click here to Skip to main content
15,888,330 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have been trying to get a complete example on the following Open a website using the WebBrowser control in C#.net 2010.
Enter the UserID and password,
Click on the Login button
Then, on the next page, enter all the form fields and submit
On a different page, read the results and store it in a file or anything. Main requirement is to fetch that data and store it.

Can you please help me with the source code ?
How can i carried out this task ?
Thank you.
Posted
Comments
Mitchell J. 5-Jan-14 1:20am    
So... you basically want your c# code to access the data entered/returned in the webbrower?
Member 10500506 5-Jan-14 1:56am    
Ya something like that for eg. consider u have google something. Now whatever the results i see on my browser screen. I want to fetch it and store it in file or directly in db using c# code.
Mitchell J. 5-Jan-14 2:59am    
But isn't the page you see in your browser screen made of HTML? Thus by programmatically looking through the HTML you should be able to find the data you want?

1 solution

If "wb" is, for example, your webbrowser control, than you can access the HTML it is displaying with
wb.DocumentText

you can also try
wb.Document


If you're familiar with HTML than you should be able to get the data you want from these properties. I recommend googling these properties for more information.
 
Share this answer
 

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