473,396 Members | 2,070 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,396 software developers and data experts.

httpresponse & redirect

Hello All, I need to post / redirect to a 3rd party URL with the form
variables dynamically created. Can anyone give me any pointers?

TIA
Oct 1 '07 #1
5 2447
Hello MikeB,

how the 3rd party contol will get these values?
u can send your variables via session, via URL params.

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
MHello All, I need to post / redirect to a 3rd party URL with the form
Mvariables dynamically created. Can anyone give me any pointers?
M>
MTIA
M>
Oct 1 '07 #2
I am posting to pay pal using pay pal standard and so for, all that I have
found is it takes form variables. I am not sure if I can place them in the
url or not.

"Michael Nemtsev" <ne*****@msn.comwrote in message
news:3d*************************@msnews.microsoft. com...
Hello MikeB,

how the 3rd party contol will get these values?
u can send your variables via session, via URL params.

---
WBR, Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

MHello All, I need to post / redirect to a 3rd party URL with the form
Mvariables dynamically created. Can anyone give me any pointers?
MMTIA
M>

Oct 1 '07 #3
the client needs to do the post, you just render a form following their
specs, and set the target.

-- bruce (sqlwork.com)

MikeB wrote:
I am posting to pay pal using pay pal standard and so for, all that I have
found is it takes form variables. I am not sure if I can place them in the
url or not.

"Michael Nemtsev" <ne*****@msn.comwrote in message
news:3d*************************@msnews.microsoft. com...
>Hello MikeB,

how the 3rd party contol will get these values?
u can send your variables via session, via URL params.

---
WBR, Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

MHello All, I need to post / redirect to a 3rd party URL with the form
Mvariables dynamically created. Can anyone give me any pointers?
MMTIA
M>

Oct 1 '07 #4
Seee System.Net.Webclient. It allos to send http requests to server (from
the top of my head , the UploadDate method should do what you are looking
for. You have just to add key/values pairs to a collection and then upload
those data).

--
Patrice

"MikeB" <m@nospam.coma écrit dans le message de news:
%2****************@TK2MSFTNGP06.phx.gbl...
Hello All, I need to post / redirect to a 3rd party URL with the form
variables dynamically created. Can anyone give me any pointers?

TIA

Oct 2 '07 #5
On Oct 2, 1:07 am, bruce barker <nos...@nospam.comwrote:
the client needs to do the post, you just render a form following their
specs, and set the target.

-- bruce (sqlwork.com)

MikeB wrote:
I am posting to pay pal using pay pal standard and so for, all that I have
found is it takes form variables. I am not sure if I can place them in the
url or not.
"Michael Nemtsev" <nemt...@msn.comwrote in message
news:3d*************************@msnews.microsoft. com...
Hello MikeB,
how the 3rd party contol will get these values?
u can send your variables via session, via URL params.
---
WBR, Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
MHello All, I need to post / redirect to a 3rd party URL with the form
Mvariables dynamically created. Can anyone give me any pointers?
MMTIA
M>- Hide quoted text -

- Show quoted text -
Here's an example

string
stringPost="cm*************************@sample.com &item_name=Item
+Name&item_number=Item
+Number&amount=100.00&no_shipping=2&no_note=1&curr ency_code=USD&bn=IC_Sample"

HttpWebRequest httpWebRequest =
(HttpWebRequest)WebRequest.Create("https://www.paypal.com/cgi-bin/
webscr");
httpWebRequest.Method = "POST";
httpWebRequest.ContentLength = stringPost.Length;
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
StreamWriter streamWriter = null;
streamWriter = new StreamWriter(httpWebRequest.GetRequestStream());
streamWriter.Write(stringPost);
streamWriter.Close();
HttpWebResponse httpWebResponse =
(HttpWebResponse)httpWebRequest.GetResponse();
using (StreamReader streamReader = new
StreamReader(httpWebResponse.GetResponseStream()))
{
stringResult = streamReader.ReadToEnd();
streamReader.Close();
}
You can also check an examples in .NET SDK
https://www.paypal.com/IntegrationCe...-resource.html

or some great articles, e.g.
http://www.west-wind.com/presentatio...ntegration.asp

Oct 2 '07 #6

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

Similar topics

0
by: James Thurley | last post by:
I'm creating an XmlDocument manually, adding content using the Xml classes such as XmlElement and XmlText, and I then write it out as as "text/xml" to the HttpResponse.Output TextWriter object...
4
by: TomT | last post by:
Hi.. I'm redirecting users to another page using: response.redirect("newpage.asp") this works... But I need to add a variable to the page specified.. IE: newpage.asp?id=JobID
4
by: Luklrc | last post by:
Hi, I'm having to create a querysting with javascript. My problem is that javscript turns the "&" characher into "&amp;" when it gets used as a querystring in the url EG: ...
2
by: Kavvy | last post by:
Hi, Can anyone tell me why the following code produces the error "An object reference is required for the nonstatic field, method, or property 'System.Web.HttpResponse.Redirect(string)'"
4
by: Paul | last post by:
I have developed an ASP.NET web page with a VB.net for the code behind. I would like to redirect the output of the web page so I can send it as an Email. Or Redirect the HTTPResponse stream on...
2
by: Vadim | last post by:
Hi, I will have to send a file to a user's browser to be opened in a Save, Open manner, I am using HttpResponse.WriteFile for this, the info to be sent will have to be first accumulated in a...
1
by: developereo | last post by:
Hi folks, Can somebody shed some light on this problem? class Interface { protected: Interface() { ...} virtual ~Interface() { ... } public:
9
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to another page (which is abcd.asp, in this case)....
4
by: newsgroup.poster | last post by:
I need to set a custom http header before perform http redirection. I do response.AppendHeader("aCustomHeader", "aCustomValue") response.Redirect("anUrl") and my added header doesn't show...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.