A user asked how to pass a “variable” between pages without using the Session object. Without using the Session or Application object, there is currently (IIS 4.0) not a way to do this. (Windows 2000 folks, there is...hang on a sec) You can pass data between pages in a number of ways:
- Make it part of the URL and be accessible through the Request.QueryString collection
- Invisible form fields that are accessible through the Request.Form collection
- Save the data to a disk file and reopen it in the next page
- Save the data to a database table and open it in the next page
In Windows 2000 and IIS 5.0, you can use the Server.Transfer method to move some information from one page to another. For instance, any data in the Request object will be made available to the second page. However, local variables that you declare won’t be available in the new page.