ASP Response Object
The ASP Response object is used to send output from the server to the user.
Try it - Example
Writing text with ASP
This example demonstrates how to write text with ASP.
Formatting text with HTML tags in ASP
This example demonstrates how to combine text and HTML tags with ASP.
Redirecting a user to a different URL
This example demonstrates how to redirect a user to a different URL.
Displaying a Random Link
This example demonstrates how to create a random link.
Controlling the buffer
This example demonstrates how to control the buffer.
Clearing the buffer
This example demonstrates how to clear the buffer.
Ending the Script During Processing and Returning a Result
This example demonstrates how to terminate a script during processing.
Set how long a page is cached in the browser before it expires
This example demonstrates how to specify how long a page is cached in the browser before it expires.
Setting the Expiration Date or Time for a Page Cached in the Browser
This example demonstrates how to specify the expiration date or time for a page cached in the browser.
Check whether a user is still connected to the server
This example demonstrates how to check whether a user has disconnected from the server.
Setting the Content Type
This example demonstrates how to specify the content type.
Set the charset name
This example demonstrates how to specify the name of the charset.
Response Object
The ASP Response object is used to send output from the server to the user. Its collections, properties, and methods are described below:
Union
| Union | Description |
|---|---|
| Cookies | Sets the value of a cookie. If the cookie does not exist, it is created and set to the specified value. |
property
| property | Description |
|---|---|
| Buffer | Specifies whether to buffer the output of the page. |
| CacheControl | Sets whether proxy servers can cache output produced by ASP. |
| Charset | Appends the charset name to the content-type header in the Response object. |
| ContentType | Sets the HTTP content type of the Response object. |
| Expires | Sets the browser cache time (in minutes) for a page before it expires. |
| ExpiresAbsolute | Sets the date and time when the cached page in the browser expires. |
| IsClientConnected | Indicates whether the client has disconnected from the server. |
| Pics | Appends a value to the PICS tag of the response header. |
| Status | Specifies the value of the status line returned by the server. |
Method
| Method | Description |
|---|---|
| AddHeader | Adds a new HTTP header and value to the HTTP response. |
| AppendToLog | Appends a string to the end of a server log entry. |
| BinaryWrite | Writes data directly to the output without any character conversion. |
| Clear | Clears the buffered HTML output. |
| End | Stops processing the script and returns the current result. |
| Flush | Sends the buffered HTML output immediately. |
| Redirect | Redirects the user to a different URL. |
| Write | Writes a specified string to the output. |