473,625 Members | 3,201 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tough redirection question

Hi,

Is it possible to do a form POST and also redirect to a different url,
using code behind?

I don't think response.redire ct will work because that doesn't post
form data.
I don't think server.transfer will work because that doesn't redirect
to a different url.
I don't think HttpWebRequest will work because that doesn't redirect
to the url, it only posts data to it.

I want to have an code behind asp.net button called "Pay", and when
you click on it, it redirects to a credit card payment site, with the
form's data posted to this website, such as the total amount, etc,
etc.

The cc payment site expects an old fashioned form post btw.

Is a code behind solution not possible?

Thanks for any expert opinion.

-dnw.
Nov 18 '05 #1
5 1573
The limitation of one form on an ASP.NET page is limited only to those
that you wish to control via ASP.NET. I would suggest putting in a
normal HTML form with an action to wherever you want and a method of
POST. No server side interaction will be done - and I assume this is
what you want.

On 11 Apr 2004 09:13:42 -0700, do***@hotmail.c om (Dot net work) wrote:
Hi,

Is it possible to do a form POST and also redirect to a different url,
using code behind?

I don't think response.redire ct will work because that doesn't post
form data.
I don't think server.transfer will work because that doesn't redirect
to a different url.
I don't think HttpWebRequest will work because that doesn't redirect
to the url, it only posts data to it.

I want to have an code behind asp.net button called "Pay", and when
you click on it, it redirects to a credit card payment site, with the
form's data posted to this website, such as the total amount, etc,
etc.

The cc payment site expects an old fashioned form post btw.

Is a code behind solution not possible?

Thanks for any expert opinion.

-dnw.


Nov 18 '05 #2
The limitation of one form on an ASP.NET page is limited only to those
that you wish to control via ASP.NET. I would suggest putting in a
normal HTML form with an action to wherever you want and a method of
POST. No server side interaction will be done - and I assume this is
what you want.

On 11 Apr 2004 09:13:42 -0700, do***@hotmail.c om (Dot net work) wrote:
Hi,

Is it possible to do a form POST and also redirect to a different url,
using code behind?

I don't think response.redire ct will work because that doesn't post
form data.
I don't think server.transfer will work because that doesn't redirect
to a different url.
I don't think HttpWebRequest will work because that doesn't redirect
to the url, it only posts data to it.

I want to have an code behind asp.net button called "Pay", and when
you click on it, it redirects to a credit card payment site, with the
form's data posted to this website, such as the total amount, etc,
etc.

The cc payment site expects an old fashioned form post btw.

Is a code behind solution not possible?

Thanks for any expert opinion.

-dnw.


Nov 18 '05 #3
Here's some ideas for you.
1) Output an old fashioned non-server form to the client (without the runat=
'server' attribute) Set the action attribute like you would have in
ASP.OLD, and use javascript to submit the form.
2) use client side script to change your ASP.NET form action attribute
3) use this webform control: http://www.wilsondotnet.com/Controls/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Dot net work" <do***@hotmail. com> wrote in message
news:77******** *************** ***@posting.goo gle.com...
Hi,

Is it possible to do a form POST and also redirect to a different url,
using code behind?

I don't think response.redire ct will work because that doesn't post
form data.
I don't think server.transfer will work because that doesn't redirect
to a different url.
I don't think HttpWebRequest will work because that doesn't redirect
to the url, it only posts data to it.

I want to have an code behind asp.net button called "Pay", and when
you click on it, it redirects to a credit card payment site, with the
form's data posted to this website, such as the total amount, etc,
etc.

The cc payment site expects an old fashioned form post btw.

Is a code behind solution not possible?

Thanks for any expert opinion.

-dnw.

Nov 18 '05 #4
Hi,

Much appreciate all replies.

Under the asp.net "Pay" button, I think I might need a mixture of code
behind and client side programming?

ASPNET_Pay_Butt on_Click
If the user needs to do something different then
response.redire ct("Another server side aspx form") 'In other words,
carry on doing typical asp.net server side type activities
else if the user wants to go ahead and pay me then
redirect and post some data using the asp.old way to a payment
website
else
'more code behind programming goes here.

Is it possible to get any of your client side suggestions inside the
code behind pay button so that I can post and redirect to the payment
website?

(I'd buy the component mentioned, but I haven't got a spare $50 at the
moment.)

-dnw.
do***@hotmail.c om (Dot net work) wrote in message news:<77******* *************** ****@posting.go ogle.com>...
Hi,

Is it possible to do a form POST and also redirect to a different url,
using code behind?

I don't think response.redire ct will work because that doesn't post
form data.
I don't think server.transfer will work because that doesn't redirect
to a different url.
I don't think HttpWebRequest will work because that doesn't redirect
to the url, it only posts data to it.

I want to have an code behind asp.net button called "Pay", and when
you click on it, it redirects to a credit card payment site, with the
form's data posted to this website, such as the total amount, etc,
etc.

The cc payment site expects an old fashioned form post btw.

Is a code behind solution not possible?

Thanks for any expert opinion.

-dnw.

Nov 18 '05 #5
I think I've done it. (Critical comments are very welcome.)

Under the asp.net "Pay" button, you can have the following code behind
code:

ASPNET_Pay_Butt on_Click
If the user needs to do something different then
response.redire ct("Another server side aspx form") 'In other words,
just carry on doing typical asp.net server side type activities
else if the user wants to go ahead and pay me then
Response.Write( "<form name='Form1' action='http://www.domain.com'
method='POST' >")
Response.Write( "<input type='hidden' name='SomeDataT hatNeedsPosting '
value='12345' >") 'The nice thing about this is that you can
construct the html values at run time using code behind.
Response.Write( "</form>")
Response.Write( "<script>")
Response.Write( "document.Form1 .submit();")
Response.Write( "</script>")
else
'more code behind programming goes here.

Thank you for all help.

-dnw.
do***@hotmail.c om (Dot net work) wrote in message news:<77******* *************** ****@posting.go ogle.com>...
Hi,

Much appreciate all replies.

Under the asp.net "Pay" button, I think I might need a mixture of code
behind and client side programming?

ASPNET_Pay_Butt on_Click
If the user needs to do something different then
response.redire ct("Another server side aspx form") 'In other words,
carry on doing typical asp.net server side type activities
else if the user wants to go ahead and pay me then
redirect and post some data using the asp.old way to a payment
website
else
'more code behind programming goes here.

Is it possible to get any of your client side suggestions inside the
code behind pay button so that I can post and redirect to the payment
website?

(I'd buy the component mentioned, but I haven't got a spare $50 at the
moment.)

-dnw.
do***@hotmail.c om (Dot net work) wrote in message news:<77******* *************** ****@posting.go ogle.com>...
Hi,

Is it possible to do a form POST and also redirect to a different url,
using code behind?

I don't think response.redire ct will work because that doesn't post
form data.
I don't think server.transfer will work because that doesn't redirect
to a different url.
I don't think HttpWebRequest will work because that doesn't redirect
to the url, it only posts data to it.

I want to have an code behind asp.net button called "Pay", and when
you click on it, it redirects to a credit card payment site, with the
form's data posted to this website, such as the total amount, etc,
etc.

The cc payment site expects an old fashioned form post btw.

Is a code behind solution not possible?

Thanks for any expert opinion.

-dnw.

Nov 18 '05 #6

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

Similar topics

8
5978
by: Manu | last post by:
Hi there, I am using a perl script to generate this html page which just redirects users to my ftp server. The problem is I get a "page cannot be displayed" in IE 6.0 (haven't tried other browsers) when the redirection happens. But the redirection happens to the correct ftp location and on pressing "Refresh" the FTP login dialog bar appears and everything is fine. Here is the HTML in question.
2
4695
by: Rick N. Backer | last post by:
Hello folks, Novice type question here. I'm working with a very simple app here that takes a series of strings from the console. Once the end user has finished inputting the strings they are individually processed and the result displayed back to the console. The problem I am having occurs during I/O redirection. Here is where
52
5426
by: Gerard M Foley | last post by:
Can one write a webpage which is not displayed but which simply redirects the user to another page without any action by the user? Sorry if this is simple, but I am sometimes simple myself. Happy New Year -- Gerry
7
2112
by: Steph | last post by:
Bonjour, Je souhaite lancer une redirection vers un fichier php via SRC= dans une condition if (voir ci-dessous en bas du script) mais la redirection ne fonctionne pas. Par contre la condition est bien validée car le cookie (crée précédemment) est bien effacé par SetCookie. Pourriez-vous me dire ce qui ne va pas ? Merci d'avance Steph
2
2922
by: John Drako | last post by:
I have a database with a lot of links. Every so often I run a script to verify if the URLs are still valid. I weed out the ones with the 404 response. However, many responses are of the 303 kind (URL redirection). with the following options, CURL does not return the redirection URL. $ch = curl_init(); $ret = curl_setopt ($ch, CURLOPT_URL,
9
17816
by: denis | last post by:
Hi there, I got a tough interview questions lately, and I would like to hear your opinion: An array of N chars is given Write an efficient algorithm to find all the repeating substring with a minimal size
13
2690
by: souissipro | last post by:
Hi, I have written a C program that does some of the functionalities mentionned in my previous topic posted some days ago. This shell should: 1- execute input commands from standard input, and also from a file conatining the commands 2- does the redirection of the input and output from and to files. 3- retrieve the environment variables like HOME,..
1
1719
by: Mike Hofer | last post by:
I really need some help, and I'd appreciate any that you folks can provide. The ASP.NET application in question uses version 1.1 of the .NET Framework. All of the pages use a common base class (derived from System.Web.UI.Page). So, for instance, my home page's inheritance chain looks like this: HomePage Inherits WebPageBase
3
1596
by: postindex | last post by:
Can I get whole commandline not only argument list. 1. When I command like this $ a.py filename 2. sys.argv is returns only argument list Is there a way to find out 'redirection' information. thank you for reading this
4
1947
by: Jim Rutledge | last post by:
ok ok , anyone know anything on this tough question? How do you determine the length in seconds that a midi file is , or any audio file for that matter ?
0
8253
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8635
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8354
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7182
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6116
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4192
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.