Using .net to enter form values (WebClient)

T

Tom Yates

Hi,

I'd like to write a web service that goes to a specified web page, enters
some data in the forms on there and gets the response. Can anyone give me a
helping hand to get started (like open a page and enter one value on a
form)? Thanks!

Tom
 
D

Darrin J Olson

What you can do is find out what page that the form with the fields on it is
being posted to, and then send your request to that page, instead of trying
to fill out fields on the form. You can potentially send them in the URL,
for example:

If the page has a form which is being posted to ReceiveData.aspx, and the
page has a field with an ID of 'Name', you may be able to just go the the
page 'http://www.myweb.com/ReceiveData.aspx?Name=Tom' and get the desired
result.


-Darrin
 
E

Esteban Felipe

You will have to use HttpWebRequest class in the web
service to call the PROCESSING page (not necessary the
page when data is entered). You will have to build the
post data by yourself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top