Student Menu. © Lesson 2. Printable layout. Links won't function in print.
Notes
Section
|
Main
Text
|
Module 2.0 |
Seven Built-in ASP Objects Synopsis. (Quick Review from ASP 1.) There are seven built-in ASP objects. Only two to four of them are ever used frequently. 1. Server Object: Represents some properties and methods of the web server. 2. Application Object: Allows web pages within a site to act as a single ASP application. 3. Session Object: Uniquely represents each visitor accessing the ASP application. 4. Request Object: Used by the visitor to request information from the web server. 5. Response Object: Used by the web server to send output in response
to the visitor's information request. |
|
The Request Object has five collections
(or parts):
1. QueryString - Sends values submitted from an HTML form within the
URL. Can be generated in four ways: (1) Anchor tag, (2) Get Method,
(3) HTTP address and (4) Response.Redirect Method.
2. Form - Sends values submitted from an HTML form within the HTTP
request body via the Post Method.
3. ServerVariables - Holds HTTP headers that contain
information such as browser type or referring page name as well as information
about the server. See project1a for practice using the ServerVariables.
4. Cookies - Identify and mark a client entering a web site by storing
information on the client's computer that is used by a particular server to
(1) personalize web pages, (2) determine where the client has been and (3)
keep clients updated on information.
5. ClientCertificate - This collection stores digital certificates
exchanged between the visiting client and the server. |
Module 2.2 *ASP processing is held within the HTML Output Stream that is sent to the client when complete. |
Response Object. Used by the web server to send output in response to the client's (visitor) information request. Some notable methods and properties are: 1. Write Method - Two techniques for sending information back to the client: (1) Response.Write and (2) the shortcut, <%= %>. 2. Buffer Property - Allows for manual control of the HTML Output Stream*. Its Flush Method immediately sends everything within the buffer to the client. Its Clear Method erases HTML already within the buffer except response headers. Its End Method stops the server from processing the ASP script and sends the remaining buffer output to the client. 3. Expires and ExpiresAbsolute Properties - Expires specifies in minutes how long a web page should be cached. ExpiresAbsolute works like Expires but is for periods longer than minutes, and it sets the date and/or time a cached web page expires. 4. Redirect Method - Informs the browser to retrieve a different web page within the same web site or on a completely different web site. Please read, outline and paraphrase Chapter
Seven and review Appendix A in the course textbook. Work
the Try It Out project for the Response Object with your own code if
possible. |
Module 2.3 |
Exercise 2.
|
Module 2.4 |
Quiz 2.
|