ASP Response



The ASP Response object is used to send output results from the server to the user.


Examples

Try it - Example

Write text using ASP
This example demonstrates how to use ASP to write text.

Using HTML tags to format text in ASP
This example demonstrates how to use ASP to combine text and HTML tags.

Redirect the user to a different URL
This example demonstrates how to redirect the user to a different URL.

Display random links
This example demonstrates how to create a random link.

Control buffer
This example demonstrates how to control the buffer.

Clear the buffer
This example demonstrates how to clear the buffer.

Terminate the script during processing and return the result
This example demonstrates how to terminate the script during processing.

Set the cache time in the browser before the page expires
This example demonstrates how to specify the cache time in the browser before the page expires.

Set the expiration date or time for the page cache in the browser
This example demonstrates how to specify the expiration date or time for the page cache in the browser.

Check if the user is still connected to the server
This example demonstrates how to check if the user has been disconnected from the server.

Set content type
This example demonstrates how to specify the content type.

Set the character set name
This example demonstrates how to specify the name of the character set.


Response Object

The ASP Response object is used to send the output results from the server to the user. Its collections, properties and methods are described as follows:

Collection

CollectionDescription
CookiesSet the cookie value. If the cookie does not exist, creates the cookie and sets the specified value.

Attribute

AttributeDescription
BufferSpecifies whether to buffer the page Output.
CacheControlSet whether the proxy server can cache the output produced by ASP.
CharsetAppend the name of the character set to the content-type header in the Response object.
ContentTypeSet the HTTP content type of the Response object.
ExpiresSet the browser cache time (minutes) before the page expires.
ExpiresAbsoluteSet the date and time when the page cache on the browser expires.
IsClientConnectedIndicates whether the client has disconnected from the server.
PicsAppend a value to the PICS tag of the response header.
StatusSpecifies the value of the status line returned by the server.

Method

MethodDescription
AddHeaderAdds new HTTP headers and values ​​to the HTTP response.
AppendToLogAppends a string to the end of the server log entry.
BinaryWriteWrite data directly to the output without any character conversion.
ClearClear buffered HTML output.
EndStop processing the script and return the current results.
FlushSend buffered HTML output immediately.
RedirectRedirect the user to a different URL.
WriteWrite the specified string to the output.