You can always pass variables between ASP.NET pages as part of a query string in the URL. If your form is not running at server you can also use the Request object to retrieve the values of the form elements (especially hidden input elements for this purpose). However, if you have a form with runat=server, and you don't want to expose the variables to the user then your choices are limited. Here is a way to pass variables between ASP.NET pages:
1. In your SendingPage.aspx add an item to the context.
Dim variableToPass as String = "Passed Value"
Context.Items.Add("variableToPass", variableToPass)
2. In your SendingPage.aspx call Server.Transfer to transfer to your ReceivingPage.aspx.
Server.Transfer("ReceivingPage.aspx", True)
3. In your ReceivingPage.aspx retrieve the variable from the context.
Dim receivedValue As String
receivedValue = Context.Items("variableToPass")
Note that the page URL in the address bar of the browser window will stay as SendingPage.aspx even though you are now in ReceivingPage.aspx. You can get more information on Server.Transfer vs. Response.Redirect at http://www.developer.com/net/asp/article.php/3299641.
If you are interested in passing server control values between ASP.NET pages please refer to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconPassingServerControlValuesBetweenPages.asp.
Famil Jones,
Karamasoft