views:

26

answers:

2

I want to auto fill in a web page and then submit the data in C#.

How can I do this?

+1  A: 

You will need to fake a POST HTTP-Request to the webserver. You will need the following classes: HttpWebRequest and HttpWebResponse. The POST data will be the values for the form fields, to find out the POST request a browser sends out, have a look at Wireshark.

Another way could be the WebClient.

Femaref
Will look into this thanks.
Also take a look at Fiddler, very nice for viewing/debugging HTTP(S) traffic between the web browser and server. http://www.fiddler2.com/fiddler2/
Chris Taylor
A: 

Do you mean programmatically or inside of an actual browser window? If the latter, try WatiN.

David