3

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.

2
  • Madi, cookies would not be appropriate for this particular scenario. Besides, I'm more of a digestive biscuit man myself.
    – Tangiest
    Jan 20, 2010 at 15:07
  • i guessed it wouldn't be that appropriate in your case, that's why i put it as a comment not an answer ;) .. but honestly "digestive biscuit" !
    – Madi D.
    Jan 20, 2010 at 15:14

3 Answers 3

5

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

2
  • actually all the methods offered as answers are already mentioned on that msdn page, so +1 for the really useful link !
    – Madi D.
    Jan 20, 2010 at 15:17
  • jacerhea, accept my apologies, posted the comment above, and I then forgot to tick the answer as accepted! Very poor form on my part.
    – Tangiest
    Feb 7, 2010 at 14:51
4

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...

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.