Microsoft Visual Basic
VBScript Samples
Start Page | Site Map
MSDN Online
 
VBScript sample: Maintaining State With Cookies
 
This page shows how easy it is to save values across pages using cookies. Use the 'Save Variable' button to create a persistent variable and save an arbitrary value (or to change the value of an already created variable). The 'Read Variable' button can be used to find the value of a previously saved variable, while 'Show Cookie' will display the document's current cookie. Use 'Kill Variable' to remove a variable from the cookie.

The SaveVariable, ReadVariable, and KillVariable procedures can be pasted into any page where there is a need to save or retrieve state information.

When done, use the 'Next Page' button to go to a different page and see that all variables are still valid.

A brief explanation is available. If this sample doesn't work, download Internet Explorer 3.0 now.

© 1997 Microsoft Corporation. All rights reserved. Legal Notices.
Start Page | Site Map
MSDN Online