ASP  «Prev  Next»

Initialize Asp Session - Exercise

Course Project: Initialize session variables and incorporate the Ad Rotator into the Project


Objective: Add session variables and an Ad Rotator.

Scoring


This exercise is worth a total of 10 points. Once you have completed your answer you will submit your answer.

Instructions

Initialize Session Variables:
  1. Open Global.asa from among your Course Project files. Initialize the following session-level variables to an empty string ("") in the Session_OnStart event:
  1. fname
  2. lname
  3. custid
  4. email
  5. password
  6. admin

  1. Next, retrieve the following server variable information: HTTP_USER_AGENT, HTTP_UA_OS, REMOTE_HOST. Assign these keys to session-level variables in the Session_OnStart event.
  2. Finally, set the user's session timeout to be 15 minutes in the Session_OnStart event.

Ad Rotator Component:
Create a schedule file to rotate the ads contained in the images directory of the course project. Please note that you are not being asked to write and incorporate a redirection file. This means the banner images of the Course Project site will not function as links. You should code your schedule file accordingly.
In the Course Project default.asp page, write a script to display the ads. You will see an area of the page set aside for this script.

Submitting your exercise

Enter your answer into the text box below. Click the Submit button to submit the code .