The information in this article applies to:
SUMMARY
DHTML Applications, like other Internet applications, are stateless. For
example, if you navigate from Page1.HTM to Page2.HTM in your DHTML
Application, you can no longer access information stored in Page1.HTM. A
separate instance of your Visual Basic code behind the DHTML Application is
created for each page. The instance is destroyed when you navigate away
from a given page. In some cases, you may need to save some "state"
information that can be accessed by multiple pages.
MORE INFORMATION
The GetProperty and PutProperty functions are part of the modDHTML module
that is added to your project when you create a new project using the DHTML
Application template. These functions are implemented in Visual Basic using
the client side cookies and are simpler to use then coding cookies
directly.
Following are some important things to remember while using these functions:
ExampleFor example, suppose you want to build a simple application that will store and retrieve data across page boundaries. The application will consist of two pages: one to store values, and one to retrieve them.The first page in the application contains a text field into which the end user can enter a value, and a button that stores the value to the cookie. The code for the button, called StoreButton1, would look like this:
The second page in the same application contains a button that, when clicked, retrieves the property from the cookie. The code for that button, called GetButton1, would look like this:
This function uses the innerText property of Dynamic HTML to replace the contents of a DIV tag, called "MyValue," with a sentence that contains the retrieved property. Additional query words: kbdsi kbDSupport kbVBp kbVBp600 kbDHTML
Keywords : |
Last Reviewed: May 19, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |