Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

Performing a POST from asp(.net) ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
+Bob+ - 19 Oct 2007 04:02 GMT
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,
Alexey Smirnov - 19 Oct 2007 07:57 GMT
> Does ASP and/or ASP.net have any modules that can be used to perform
> HTTP POSTs to web pages and forms?
[quoted text clipped - 5 lines]
>
> 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
+Bob+ - 19 Oct 2007 19:47 GMT
>Look at the HttpWebRequest
>
[quoted text clipped - 5 lines]
>
>and so forth

Thanks.
Göran Andersson - 19 Oct 2007 12:03 GMT
> Does ASP and/or ASP.net have any modules that can be used to perform
> HTTP POSTs to web pages and forms?
[quoted text clipped - 6 lines]
> 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.

Signature

Göran Andersson
_____
http://www.guffa.com

+Bob+ - 19 Oct 2007 19:31 GMT
>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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.