ASP   « Prev  Next »

Lesson 4ASP Request Object
Objective Describe the ASP Request object.

ASP Request Object

In an earlier lesson, we explained the interactions between the browser (or client) and the server. Since the browser starts the dialog, we called the client side[1] the request and the server's reply the response. The ASP Request object represents the client-side request and any user data sent as part of that request.
The server's task in receiving a request is to:
  1. Identify the data
  2. Store and/or process the received data
  3. Respond appropriately

The Request object makes all the information sent from the user's browser, including binary files sent as file uploads, available to the server . Some information, such as the browser type and operating system, may be used by the server to send browser-specific versions of Web pages to the user .

Uses of the Request object

Although the Request object has many features , it is most commonly used for four tasks:
  1. Reading data from browser cookies (Request.Cookies)
  2. Reading query strings (Request.Query)
  3. Reading input HTML <FORM> elements (Request.Form)
  4. Reading and storing Server Variables, the header information from browser requests (Request.ServerVariables)
Upcoming lessons will illustrate each of these uses of the Request object.
The next lesson describes how the Request object processes HTML Form data.

[1] Client-side: Running on a client, rather than a server. For example, a Java applet embedded in an HTML page runs on the client computer, not the server that sends out the page.