ASP   «Prev  Next»

Lesson 11Request and Response objects
ObjectiveUse Request and Response objects to recognize a user.

ASP Course Project - Request and Response Objects

One way of personalizing a user's visit to a Web site is to greet a returning visitor by name. Some Web sites use stored user preference data to display a particular type of advertisement or to go directly to the Web page that the user most recently visited.
Using cookies is one way to record, store, and read this user data, and it is the most common method of doing so. Another, more complicated method uses a database connected to the website. This procedure will be discussed in a later lesson.

QueryString Collection Examples

  1. Send query information when a user clicks on a link
  2. How to send query information to a page within a link, and retrieve that information on the destination page (which is, in this example, the same page).
  3. A QueryString collection in its simplest use
  4. Use the QueryString collection to retrieve the values from a form (the form uses the get method, the information sent is visible to everybody).
  5. How to use the values retrieved from a form.
  6. What the QueryString collection contains if several input fields have equal names. It also shows how to use the Count keyword to count the "name" property.

The lessons in this module on the uses of the ASP Request and Response objects, the code samples, and the exercises give you all the tools you need to put this capability into the TMania project Web site. You now know how to retrieve and reference user data from an HTML Form, how to create cookies and send them to the user, and how to read and display cookie data that you have previously created. The next lesson concludes this module.

Course Project Exercise

Click the Exercise link below to practice storing and retrieving information using cookies.
Course Project - Exercise