Passing parameters using Server.Transfer but not using query string

TheGateKeeper picture TheGateKeeper · Apr 26, 2012 · Viewed 11.4k times · Source

I have a registration form and want to transfer the user to the success page, telling him that an email was sent to his email. I need to transfer his email from the register page to the success page.

I found about Server.Transfer, but I can't find out how to send parameters. I don't want to use query string as I don't like revealing information in the URL.

What is the proper way (if possible) to do this?

Answer

Chris Gessler picture Chris Gessler · Apr 26, 2012
Server.Transfer("destination.aspx", true)

You might see that the above code contains the name of the page to which the control is transferred and a Boolean value ‘True’ to indicate to preserve the current form state in the destination page.