How can I pass form values to another websites

K

KFactor

Is it possible to pass form variables to a page on another server using
response.redirect?

Or is there a secure way of passing sensitive information from one site to
another such as a userID?

I would like to avoid using the querystring.

This is what I would like to do:
When a user clicks on the link, I need to add them to the database and then
redirect them to a page on another server. That server should be able to get
the userID from the form data (or hidden fields) and not the querystring.

This is how I tried to handle it:
After they clicked on the link, they go to another page on my server. In the
load event of that page I add them to the database. Then I redirect them to
a page on another server.

When I do this, the form values or hidden fields on my page does not get
posted to the page on the other server. I would like to use the
Request.Form.Add to add the userID in the page_load event, but it tells me
it is read-only.

I'm using vs2003, .net 1.1

Any help would be appreciated.
 
J

John Timney \( MVP \)

Redirect is nothing more than a command to the browser to change its url
location, so the only way using redirect with values is to use the query
string.

With asp.net 2 you can use the PostBackUrl form option, and inject
javascript that onload would autosubmit your form to a new URL address
containing your hidden fields.

Form data is not really any more secure than the query string, so if your
worried about it being intercepted work out some form of hashing alogorithm
only known to your two servers to encode and decode a value and stop it
being read or reused by incorporating the curent minute or http referrer.
That way using the query string would probably be just as easy. You could
of course choose to output a form without the runat server command as
output following your DB inserts, response.write your output and do some
form of javascript form submission to your second server.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top