image\cslogo3d1.gif

ASP Response Object Overview

The Response object is one of the five Chili!Soft ASP built-in objects. The Response object is used to send information to the user. The Response object supports only Cookies as a collection (to set cookie values). Both the Request and Response objects support the following collections:

·              QueryString—gets text, such as a name

·              Form—gets data from an HTML form

·              Cookies—gets the value of application-defined cookie

·              ServerVariables—gets HTTP information, such as the server name

The Response object also supports a number of properties and methods. Supported properties are:

·              Buffer—buffers page output at the server. When this is set to TRUE, the server will not send a response until all of the server scripts on the current page have been processed, or until the Flush or End method has been called.

·              ContentType—sets the type of content (i.e., text/HTML, Excel, and so forth)

·              Expires—sets the expiration (when the data in the user's cache for this Web page is considered invalid) based on minutes (i.e., expires in 10 minutes).

·              ExpiresAbsolute—enables you to set the expiration date to an absolute date and time.

·              Status—returns the status line (defined in the HTTP specification for the server).

Supported methods are:

·              AddHeader—adds an HTML header with a specified value

·              AppendToLog—appends a string to the end of the Web server log file

·              BinaryWrite—writes binary data (i.e., Excel spreadsheet data)

·              Clear—clears any buffered HTML output

·              End—stops processing of the script

·              Flush—sends all of the information in the buffer

·              Redirect—redirects the user to a different URL

·              Write—writes into the HTML stream. You can do this by using the construct Response.Write("hello") or the shortcut command <%="hello"%>.

For information about using the ASP built-in objects, see "ASP Built-in Objects Reference" in "Chapter 5: Developer's Reference."

See also:

Using Chili!Soft ASP Built-in Objects in this chapter

ASP Response Object in "Chapter 5: ASP Built-in Objects Reference"

Copyright 2001 Sun Microsystems, Inc. All rights reserved. Legal Notice.