Object ng Response ng ASP

Ang ASP Response object ay ginagamit para sa pagpapadala ng mga resulta ng output mula sa server sa user.

Mga Halimbawa

Gamit ang ASP para sa pagsusulat ng teksto
This example demonstrates how to write text using ASP.
Use HTML tags to format text in ASP
This example demonstrates how to combine text and HTML tags using ASP.
Redirect the user to a different URL
This example demonstrates how to redirect the user to another URL.
Display random links
This example demonstrates a hyperlink that will display one of the two links each time the page is loaded.
Control cache
This example demonstrates how to control the cache.
Clear cache
This example demonstrates how to clear the cache.
Terminate the script during processing and return the result
This example demonstrates how to interrupt the execution of the script during the process.
Set how many minutes to cache the page in the browser before it expires
This example demonstrates how to specify the cache time of the page in the browser before it expires.
Set the cache expiration date or time in the browser
This example demonstrates how to specify the cache time and date or time of the page in the browser.
Check if the user is still connected to the server
This example demonstrates how to check if the user has disconnected from the server.
Set content type
This example demonstrates how to specify the content type.
Set character set
This example demonstrates how to specify the name of the character set.

Response object

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

Collection

Collection Description
Cookies Set the value of the cookie. If it does not exist, create a cookie and set the specified value.

Property

Property Description
Buffer Specify whether the output of the page is cached.
CacheControl Set whether the proxy server can cache the output generated by ASP.
Charset Append the name of the character set to the content-type header of the Response object.
ContentType Set the HTTP content type of the Response object.
Expires Set the browser cache time before the page expires (in minutes).
ExpiresAbsolute Set the date and time when the page cache on the browser becomes invalid.
IsClientConnected Indicate whether the client has disconnected from the server.
Pics Append values to the PICS flag of the response header.
Status Specify the value of the status line returned by the server.

Method

Method Description
AddHeader Add new HTTP headers and values to the HTTP response.
AppendToLog Add a string to the end of the server log entry (server log entry).
BinaryWrite Directly write data to the output without any character conversion.
Clear Hilahin ang nakakacheck na HTML output.
End Itigil ang pagproseso ng script at ibalik ang kasalukuyang resulta.
Flush Ipadala agad ang nakakacheck na HTML output.
Redirect I-reDirect ang user sa ibang URL.
Write Magsulat ng tinukoy na string sa output.