|Lesson 9||Course Project|
|Objective||Write session variables to a file in our course project.|
Write Session Variables to File using ASP
In this portion of the course project, you will write the code to take the session variables intialized in the previous Course Project exercise and write them out to a text file. Once the variables are captured, you will also write code to display the file.
The next lesson concludes the module.
Create Display - log Records - Exercise
You can use the Session object to store information needed for a particular user-session. Variables stored in the Session object are not discarded when the user jumps between pages in the application; instead, these variables persist for the entire user-session.
The Web server automatically creates a Session object when a Web page from the application is requested by a user who does not already have a session. The server destroys the Session object when the session expires or is abandoned. One common use for the Session object is to store user preferences. For example, if a user indicates that they prefer not to view graphics, you could store that information in the Session object.
Note Session state is only maintained for browsers that support cookies.