JavaDeploy
SiteMap
Perl 1
Perl 2
ASP
XML
ASP
«Prev
Next»
Intro ASP
Active Server Pages
Server Side Scripting
Script Syntax
Constants Variables
Arithmetic Operators
Decision Statement
Builtin Functions
Response Write
Three Parts
ASP Object Model
Methods Write Scripts
Project Interactive Message
Server Side Conclusion
Browser Server Dialog
Browser Server Communication
Request Query String
ASP Request Cookies
ASP Response Object
Customizing User Experience
Http Protocol WebsiteVisitor
ASP Session Object
GlobalAsa File
Retrieve Server Variables
Personalize ASP WebSite
Advertisement Rotator Component
Controlling Advertisement Rotation
ASP Server Object
Customization Course Project
Http Protocol Conclusion
Building Webapps
Running ASP Web Application
Using Global Asa File
App Level Variables
Variables Race Condition
File System Object
Writing Text File
Reading Outputting Files
Write Session Variables
ASP Web App Structure
ASP Request and Response objects - Exercise
The course project:
Creating and reading cookies
Objective:
Use ASP to store user information.
Scoring
This exercise is worth a total of 10 points.
To receive full credit, you will need to correctly create the ASP script so that it performs its tasks. Once you have completed your answer you will submit your answer.
Background/overview
In this exercise, you will set user information based on data contained in the user registration form. In the course download, you will find a file, called
signup.asp
, which includes a form used to set the user's information. This form is submitted to a file named
signup_confirm.asp
. You will be modifying the
signup_confirm.asp
file to set the user information in a cookie. You will then modify the
default.asp
page to greet this user upon arrival at the site.
Instructions
Complete the ASP script in
signup_confirm.asp
to create a cookie that contains some of the user information in the registration form. You will find a comment in the file directing you as to where to insert the code. You do not need to include all the form fields in your cookie.
In order to be consistent with the rest of the project, your cookie needs to be named "SavedLogin" and contain the following subkeys 'fname', 'lname' and 'email'.
Note: the Expires property and CustId subkey of the cookie have been set for you to ensure consistency.
Your next task is to welcome the user back to your site based on the cookie information that was set in
signup_confirm.asp
.
Write the necessary code in the
default.asp
page to retrieve the 'fname' subkey of your cookie and welcome the user to the site.
Once you have your script working and welcoming the user, write or paste your answer in the text area below.
Submitting your exercise
Enter your answer into the text box below. Click the
Submit
button to submit the code to the processing engine.