views:

282

answers:

3

Hi,

I am currently using a number of query string parameters to pass some data from one page to a second page (the parameters hold confirmation/error messages to display in the second page), that due to a third party product can no longer work correctly in the production environment. The user completes an action on the first page, and is then transferred to the second page. What are the possible alternatives to use instead of a query string and GET - session variables, POST data, or something completely different?

Thanks, MagicAndi.

+4  A: 

Both POST data and session variables would work just fine. POST data has the drawback that it can be changed by the client and session variables take up memory, so you can choose based on that. I personally don't think that you should pass such messages to the client for the reason stated above but I guess you are already doing that, so...

klausbyskov
A: 

you can use this if you use window.open("openTheotherPage",...etc)

so form the opened page you can do something like this

var valuefromCallerPage = window.opener.document.FormNmae.textbox.value

or button or anything on the caller page

peacmaker
+2  A: 

You could create public properties in a source page and access the property values in the target page when using a server transfer. You could also get control information in the target page from controls in the source page by referencing the Page.PreviousPage property.

Both of these methods are oulined here: http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx

Jace Rhea
actually all the methods offered as answers are already mentioned on that msdn page, so +1 for the really useful link !
Madi D.
jacerhea, accepted as the answer, thanks for the link!
MagicAndi
jacerhea, accept my apologies, posted the comment above, and I then forgot to tick the answer as accepted! Very poor form on my part.
MagicAndi