epmo
asked on
transfering data between pages
What is the best way to transfer data from a form to another page?
We're not doing a post to a second page b/c we are hadling the data insert to the DB from webform1.aspx.cs
but we want to display a confirmation page with the values submitted. What would be the best way to do it?
Thanks.
We're not doing a post to a second page b/c we are hadling the data insert to the DB from webform1.aspx.cs
but we want to display a confirmation page with the values submitted. What would be the best way to do it?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
well, i'd say it's reliable and a very good way to handle it, but probably you might want to hear somebody's else opinion ;)
regards
regards
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
to my understanding, there was a different way of passing individual variables between pages but can't recall it how to do it exactly - it was as passing parameters in the address of the page you're calling for... I don't remember syntax and this way was very fast but absolutely unsecure, so probably you wouldn't like to use it anyway...
the only other issue with session is it can take some memory on the server, so, if you have multi-user application and they all simultaneosly passing sessions between their pages, it can become resource-stressful... so delete it when you don't need it as stated above
regards,
yurich
the only other issue with session is it can take some memory on the server, so, if you have multi-user application and they all simultaneosly passing sessions between their pages, it can become resource-stressful... so delete it when you don't need it as stated above
regards,
yurich
ah you are talking about through the query string. Basically the way that works is you are tagging on variables at the end of the URL.
you access this with Request.QueryString["Varia bleName"] and it returns a string.
so you can build a link or url http://whereyouaregoing.com/index.aspx?whoami=jj&wherecanifindstuff=expertsexchange (yes it is corny)
Request.QueryString["whoam i"] == "jj"
and
Request.QueryString["where canifindst uff"] == "expertsexchange"
You will want to use the frameworks method for throwing things into the querystring so it can handle all of the special charachters for you.
But remember these need to be validated. These inputs can be malformed by a user.
you access this with Request.QueryString["Varia
so you can build a link or url http://whereyouaregoing.com/index.aspx?whoami=jj&wherecanifindstuff=expertsexchange (yes it is corny)
Request.QueryString["whoam
and
Request.QueryString["where
You will want to use the frameworks method for throwing things into the querystring so it can handle all of the special charachters for you.
But remember these need to be validated. These inputs can be malformed by a user.
ASKER
hmm.. what about a form "POST"?
what do you mean by "POST", posting back to the server?
ASKER
no we mean, posting a form to a separate page..
ASKER