Click to See Complete Forum and Search --> : pass a string from one asp page to another


dynagirl
05-06-2003, 05:30 PM
When my form is submitted, the data is grabbed by an asp script, reformatted and sent in an email. The user is then redirected to a Thank You page.

Now, however, I need to add an order number into the process. A random number is fine and I've already got that part covered. My problem is in getting the number into the flow of data. Whether I use javascript or asp to generate the number, I can not figure out how to incorporate that number into BOTH the email that gets sent (with the form data on it) and into the "Thank You" page.

I've tried generating the random number within the asp script itself, but can't figure out how to make the latter part of the script incorporate it into the email it sends when it compiles all the data from my form. And I also can not figure out how to have my "Thank You" page get ahold of that same number.

I'm sort of new to asp, so any help at all would be greatly appreciated!

khalidali63
05-06-2003, 05:53 PM
I know you can use the url to pass this info or I think you should be able to use session object to store some value in it and retrieve it on the next page..

dynagirl
05-06-2003, 07:45 PM
Problem solved!!

Thanks anyway, but I got it figured out. I ended up creating the random number with javascript and made it part of the form (thanks to a brilliant little script posted by someone on the javascript forum).

So now, my order number is created in a hidden field in my form and is passed to the asp script and the thank you page through a cookie.

Perfecto!

:)

Bullschmidt
05-07-2003, 02:35 AM
Dynagirl,

Thanks for posting the answer as it's always interesting to see what actually worked.