Performing a POST from asp(.net) ?

B

+Bob+

Does ASP and/or ASP.net have any modules that can be used to perform
HTTP POSTs to web pages and forms?

This would be an application where there would be one form for the end
user to fill out - then the called asp(.net) program would set up the
data to be passed by POST (HTTP Headers) and call the ASP or CGI that
further processes the data.

Thanks,
 
G

Guest

Does ASP and/or ASP.net have any modules that can be used to perform
HTTP POSTs to web pages and forms?

This would be an application where there would be one form for the end
user to fill out - then the called asp(.net) program would set up the
data to be passed by POST (HTTP Headers) and call the ASP or CGI that
further processes the data.

Thanks,

Look at the HttpWebRequest

HttpWebRequest request =
(HttpWebRequest)HttpWebRequest.CreateDefault(url);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.ContentLength = ...;

and so forth
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

+Bob+ said:
Does ASP and/or ASP.net have any modules that can be used to perform
HTTP POSTs to web pages and forms?

This would be an application where there would be one form for the end
user to fill out - then the called asp(.net) program would set up the
data to be passed by POST (HTTP Headers) and call the ASP or CGI that
further processes the data.

Thanks,

You can use the HttpWebRequest class or the WebClient class to post data.

If you have any control over how the server will recieve the data, you
should consider setting up a web service instead of using HTTP posts. In
ASP.NET you can add a reference to a web service, and it automatically
creates a class with methods that you can use to call the web service.
 
B

+Bob+

You can use the HttpWebRequest class or the WebClient class to post data.

If you have any control over how the server will recieve the data, you
should consider setting up a web service instead of using HTTP posts. In
ASP.NET you can add a reference to a web service, and it automatically
creates a class with methods that you can use to call the web service.

Thanks... I'm calling to other people's forms, so I have no control
over the server.
 
B

+Bob+

Look at the HttpWebRequest

HttpWebRequest request =
(HttpWebRequest)HttpWebRequest.CreateDefault(url);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.ContentLength = ...;

and so forth

Thanks.
 

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,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top