You'd need to post the viewstate back as well, but why bother with any of that? Couldn't you write a web service or other remote-callable interface of faking a browser?
Jim > -----Original Message----- > From: Marc Mertens [mailto:[EMAIL PROTECTED]] > Sent: 16 May 2002 12:55 > To: [EMAIL PROTECTED] > Subject: [DOTNET] Using HttpWebRequest to fill in a webform > > > Hallo, > > I'm trying to write a application that automaticall fills in the > input fields of a webform and let the webform process this request. > More concreat suppose that you have a webform with two input > fields and > a submit button. If you fill in the fields and press the submit button > some processing is done at the webserver, I want to make a application > that replace the browser and automate the filling in of the > form. I use > HttpWebRequest to send a POST request to the webform and get > the response > back. The webform seems to receive the request with the correct date > (verified with the Page.Request property on the Page_Load > delegate, but it > will not issue a click event for the button, so no processing > is done at > the webserver, how can I ensure that my client application > force the 'click' > on the submit button. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.