By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,855 Members | 1,988 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,855 IT Pros & Developers. It's quick & easy.

How can I pass form values to another websites

P: n/a
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.

Dec 7 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

"KFactor" <an*******@discussions.microsoft.com> wrote in message
news:ue***************@TK2MSFTNGP10.phx.gbl...
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.

Dec 7 '05 #2

P: n/a
Read the below article it will help u
http://www.c-sharpcorner.com/Code/20...ostingData.asp

"KFactor" wrote:
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.

Dec 7 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.