473,378 Members | 1,138 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Using HttpWebRequest

I would like to take some data off an ASP.NET form and then use that data to
post a new form to another web site. I was going to use:
HttpWebRequest, but I want to be able to post the form and follow the form
submission.
Any ideas?
Thanks,
Rog
Nov 16 '05 #1
4 8707
Roger,

You can definitely do this. What you hav to do is create your
HttpWebRequest for the url that you want to post to. Then, set the Method
property to "POST". Finally, all you have to do is get the request stream
(through the GetRequestStream method), and write the posted values to the
stream. When done, you can call GetResponse to get the associated response.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Roger R. Smith" <ro****@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like to take some data off an ASP.NET form and then use that data to post a new form to another web site. I was going to use:
HttpWebRequest, but I want to be able to post the form and follow the form
submission.
Any ideas?
Thanks,
Rog

Nov 16 '05 #2
If I try to use paypal for instance from my site and I collect some
information on an ASP.NET web form and then I want to do some processing
before I forward onto paypal. I then went to put the relevant information
into a form and submti that form to paypal and have the page redirect to to
the paypal page with the data that was just submitted in the form.
I want to use a form submission rather than a get to prevent users from
changing the parms in the request url.
Thank you so much for replying!!!
Rog
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uI**************@TK2MSFTNGP10.phx.gbl...
Roger,

You can definitely do this. What you hav to do is create your
HttpWebRequest for the url that you want to post to. Then, set the Method
property to "POST". Finally, all you have to do is get the request stream
(through the GetRequestStream method), and write the posted values to the
stream. When done, you can call GetResponse to get the associated response.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Roger R. Smith" <ro****@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like to take some data off an ASP.NET form and then use that data
to
post a new form to another web site. I was going to use:
HttpWebRequest, but I want to be able to post the form and follow the

form submission.
Any ideas?
Thanks,
Rog


Nov 16 '05 #3
Roger,

If your next posting is about how to send out emails (while masking the
sender to make it look like you are from paypal), I'm going to hunt you down
=)

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Roger R. Smith" <ro****@yahoo.com> wrote in message
news:ON*************@tk2msftngp13.phx.gbl...
If I try to use paypal for instance from my site and I collect some
information on an ASP.NET web form and then I want to do some processing
before I forward onto paypal. I then went to put the relevant information
into a form and submti that form to paypal and have the page redirect to to the paypal page with the data that was just submitted in the form.
I want to use a form submission rather than a get to prevent users from
changing the parms in the request url.
Thank you so much for replying!!!
Rog
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:uI**************@TK2MSFTNGP10.phx.gbl...
Roger,

You can definitely do this. What you hav to do is create your
HttpWebRequest for the url that you want to post to. Then, set the Method
property to "POST". Finally, all you have to do is get the request stream (through the GetRequestStream method), and write the posted values to the stream. When done, you can call GetResponse to get the associated

response.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Roger R. Smith" <ro****@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like to take some data off an ASP.NET form and then use that

data
to
post a new form to another web site. I was going to use:
HttpWebRequest, but I want to be able to post the form and follow the

form submission.
Any ideas?
Thanks,
Rog



Nov 16 '05 #4
Are there any good references to using C# ASP.NET 2005 to create an Http Client?
Jun 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
0
by: Cenray | last post by:
How to generate a web request from a Winform Application using a WebService? In a C# Windows Application, when I try to genrate a web request using the following code, it is woking fine ...
1
by: Vasu | last post by:
Hi, I have a requirement to download a file from the web site using a client tool. Iam writing a C# program to download using WebRequest, HttpRequest, WebResponse and so on. The problem...
16
by: thomas peter | last post by:
I am building a precache engine... one that request over 100 pages on an remote server to cache them remotely... can i use the HttpWebRequest and WebResponse classes for this? or must i use the...
4
by: Steven Pu | last post by:
Hi, Specifically, the website I am trying to access is, https://gmail.google.com/ I've read elsewhere that Google only uses SSL2, while .NET uses SSL3 and is not backward compatible. Is...
0
by: Subra Mallampalli | last post by:
Hi, I am trying to connect over HTTPS using a client certificate. I am able to connect fine when using IE. From my application, however, I get the following error: The underlying connection...
7
by: | last post by:
Hello, I would like to do the following from a asp.net button click: <form method="POST" action="https://www.1234.com/trans_center/gateway/direct.cgi"> <input type="hidden" name="Merchant"...
5
by: | last post by:
Hi all, HttpWebRequest, and SoapHttpClientProtocol both expose a ClientCertificates property, which can hold multiple client certificates, but on the service side, it can only receive one client...
2
by: STEVE.KING | last post by:
Greetings: I need to download an executable and some other binary files (a C++ DLL) from a virtual directory in my WinForms application. No-Touch Deployment manages my .NET code fine but...
5
by: Dave | last post by:
What is the benefit of using "as" vs the other? HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://www.contoso.com/"); vs. HttpWebRequest myReq...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.