473,399 Members | 4,177 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,399 software developers and data experts.

C# / ASP.NET - how to transfer user to, and post data to, a url at the same time??

Hi all

I am trying to insert an order into my database, post some data to a third party payment system and redirect the user to the third party payment page all in the same method.

I can write to the database ok, I can post the data to the payment URL ok, but i cant redirect the user in the same action.

I have tried Server.TransferRequest but im getting a PlatformNotSupported exception (my host is running IIS6). I have also tried using a basic html form (which works) but doesnt allow me to execute additional code in the .cs file (to insert into the database and do thoer things).

I would really appreciate any suggestions as to how i can do this.

For reference, this is the code in my form button click event. I need something similar that works on IIS6 / .NET 2.0:

**used php formatting for clarity only***

[PHP]protected void Btn_Purchase(object sender, EventArgs e)
{
//insert order into database
Order o = (Order)Session["order"];
Customer c = (Customer)Session["customer"];
onlinepayments.OrderDAC.InsertOrder(o, c);

//create post data for payment site
NameValueCollection nv = new NameValueCollection(3);
nv.Add("epdqdata", encryptedData);
nv.Add("returnurl", "http://www.mysite.com");
nv.Add("merchantdisplayname", "MySite");

//transfer user and post data
Server.TransferRequest("https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdqEncTool.e", true, "POST", nv);
} [/PHP]


thanks in advance for any help...

:)
Feb 19 '08 #1
0 1244

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Philip Korolev | last post by:
Hi All. I am attempting to use SSL for the first time with ASP.NET I would like to be able to send my form details to another page using https:// connection. The page I am sending data to, uses...
6
by: StephenMcC | last post by:
Hi All, Got a quick query in relation to the Server.Transfer method available in IIS 5+/ASP. I've got an issue where I want to take a portion of an online app and extract this out into a web...
3
by: Manuel Lopez | last post by:
Hello, We have two applications that will reside on the same webserver. We want to be able to post from pages in App1 to to pages in App2. We need to pass sensible data, so we cannot use...
8
by: Cathie | last post by:
Hi guys, I want to do a Server.Transfer to get to a second page, so that I may retrieve variables I have set in the first page. I'm doing that with the usual Server.Transfer("pagename", true). ...
4
by: Piotr Strycharz | last post by:
Hi all I do have a problem. How can I transfer user to another server using POST. The problem is that Server.Transfer (preserves form data) works just in current server. Response.Redirect -...
2
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
4
by: Keith Patrick | last post by:
I have an app where a Shockwave splash animation starts off my app and then sets its parent iframe's src to the value of a default page "BasicReports". BasicReports has a link to another report...
3
by: David Veeneman | last post by:
I am creating a form on the server that I want to POST to a URL that's being called with Server.Transfer(). What's the simplest way to do that? A little background: I'm programming buttons that...
4
by: David Veeneman | last post by:
I want to programmatically create some POST data on a web server, then pass that data to another web page that the server calls, using Server.Transfer(). What's the best way to do that? I'm...
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: 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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.