[Lifetime of variables][Applications][The Global.asa file][ASP Built-in Objects][Response Object]
[Request Objects][Content Linking]

 

Response Object

The Response Object is used to send output to the user from the server.

Syntax

Response.collection

Response.property

Response.method

Collections

Collection

Description

Cookies(name)

Sets a cookie value. If the cookie does not exist, it will be created, and take the value that is specified

Properties

Property

Description

Buffer

Whether to buffer the output or not. When the output is buffered, the server will hold back the response until all of the server scripts have been processed, or until the script calls the Flush or End method. If this property is set, it should be before the <html> tag in the .asp file

CacheControl

Sets whether proxy servers can cache the output or not. When this property is set to Public, the output can be cached by a proxy server

Charset(charset_name)

Sets the name of the character set (like "ISO8859-1") to the content type header

ContentType

Sets the HTTP content type. Some common content types are "text/html", "image/gif", "image/jpeg", "text/plain". The default is "text/html"

Expires

Sets how long a page will be cached on a browser before it expires

ExpiresAbsolute

Sets a date and time when a page cached on a browser will expire

IsClientConnected

Check to see if the client is still connected to the server

Pics(pics_label)

Adds a value to the pics label response header.

Status

Specifies the value of the status line. You can change the status line with this property


Methods

Method

Description

AddHeader(name, value)

Adds an HTML header with a specified value

AppendToLog string

Adds a string to the end of the server log entry

BinaryWrite(data_to_write)

Writes the given information without any character-set conversion.

Clear

Clears the buffered output. Use this method to handle errors. If the Response.Buffer is not set to true, this method will cause a run-time error

End

Stops processing the script, and return the current result

Flush

Sends buffered output immediately. If the Response.Buffer is not set to true, this method will cause a run-time error

Redirect(url)

Redirects the user to another url

Write(data_to_write)

Writes a text to the user