Newbie question

  • Thread starter Thread starter Kevin Audleman
  • Start date Start date
K

Kevin Audleman

Hi,

I've got a page with a form that submits to another page on my site
where I parse the data. I then want to transfer to an external page on
another company's website with the form data. I thought I could use
Server.Transfer, but that's only for internal pages. Response.Redirect
doesn't appear to pass on the form data. Is there some way I can do
this?

Thanks,
Kevin
 
Well there are a couple of ways to do it and they depend on your exact
situation.

If you need the browser to be redirected to that external server (so
the user is taken to that page in the browser) then you have a couple
options.

1) You can use the Response.Redirect and pass the information in the
querystring. Not so good with certain types of information though or
if the form has a lot of data because there is a querystring limit.

2) You could build a page that has the information in hidden fields
with the action to post the information to the other server. You
could autopost with JavaScript or have a Thank You type page telling
the user to click on a link or button to continue.

If however, you don't need the users browser to be redirected then you
have a more elegant way of handling it. You can use the
HTTPWebRequest object to do the post yourself and then you could
redirect the user to whatever page you want after that.

Here is a quick example of how to do a POST with the HTTPWebRequest
object: http://www.netomatix.com/HttpPostData.aspx
 
Well there are a couple of ways to do it and they depend on your exact
situation.

If you need the browser to be redirected to that external server (so
the user is taken to that page in the browser) then you have a couple
options.

1) You can use the Response.Redirect and pass the information in the
querystring. Not so good with certain types of information though or
if the form has a lot of data because there is a querystring limit.

2) You could build a page that has the information in hidden fields
with the action to post the information to the other server. You
could autopost with JavaScript or have a Thank You type page telling
the user to click on a link or button to continue.

If however, you don't need the users browser to be redirected then you
have a more elegant way of handling it. You can use the
HTTPWebRequest object to do the post yourself and then you could
redirect the user to whatever page you want after that.

Here is a quick example of how to do a POST with the HTTPWebRequest
object:http://www.netomatix.com/HttpPostData.aspx

Thanks!
 
Back
Top