Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

ASP Response Object Overview

The Response object is one of the five Sun 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 (such as text/HTML, Excel, and so forth).

   Expires: sets the expiration based on minutes (when the data in the user's cache for this Web page is considered invalid; for example, 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 (for example, 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 Sun Chili!Soft ASP Built-in Objects in this chapter

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

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