Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Performing a POST from asp(.net) ?

Reply
Thread Tools

Performing a POST from asp(.net) ?

 
 
+Bob+
Guest
Posts: n/a
 
      10-19-2007
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,

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      10-19-2007
On Oct 19, 5:02 am, +Bob+ <uctra...@ultranet.com> wrote:
> 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

 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?G=F6ran_Andersson?=
Guest
Posts: n/a
 
      10-19-2007
+Bob+ wrote:
> 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.

--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
+Bob+
Guest
Posts: n/a
 
      10-19-2007
On Fri, 19 Oct 2007 13:03:27 +0200, Göran Andersson <>
wrote:

>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.
 
Reply With Quote
 
+Bob+
Guest
Posts: n/a
 
      10-19-2007
On Fri, 19 Oct 2007 06:57:51 -0000, Alexey Smirnov
<> wrote:

>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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble Performing An HTTP POST rh1200la@gmail.com ASP .Net 1 09-28-2006 11:51 PM
A tool returned an error code from "Performing registration" error Wes Stebbins ASP .Net 1 07-15-2005 08:05 PM
Security-exception when performing File.Move() Fredrik Arenhag ASP .Net 3 01-14-2004 03:29 PM
Post post post. Shel-hed Computer Support 2 11-08-2003 07:41 AM
Internet Explorer hanging when performing operations... Marcelo ASP .Net 0 08-26-2003 03:01 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57