Page

7.1.1- Sending Information to the Server

  by NT Community Manager.
Last Updated  by Jim Minatel.  

PublicCategorized as 07. The Request and Response Objects.

Not tagged.
<< 7.1.0- Handling Browser/Server communicationsChapter77.1.10- Using the Server Object to Control what the browser does >>

Sending Information to the Server

The information supplied by the client is categorized, in the ASP model, into groups of items called collections. In a collection, each piece of information is stored as a name/value pair. We talked about name/value pairs in the previous chapter , when we introduced object properties. In ASP, a collection is simply a set of these name/value pairs, specific to the Request object. More particularly, a collection lists added items, each of which has a unique value that describes the property.

 

name=chris

luckynumber=23

date=1/1/99

 

If there are three fields in a form then the form collection will contain three name/value pairs. For each, the name comes from the <INPUT> tag's NAME attribute and the Value comes from what the user typed in the corresponding text box, or selected from the list box (or if no typing or selection, the default VALUE attribute). This information is all included in the request.

 

By using the information included with the request, along with the scripting logic in the ASP page, the server can dynamically generate a page for the client to display. In order for the client to display the information, the server needs a mechanism to relay the data back to the client. This is the job of the Response object. Let's see how you'd go about returning information to the client using the Response object.

<< 7.1.0- Handling Browser/Server communicationsChapter77.1.10- Using the Server Object to Control what the browser does >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |