Tutorials References Exercises VideosMenu
Free WebsiteGet CertifiedPro

ASP Response Object


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


More Examples

Write text with ASP
How to write text with ASP.

Format text with HTML tags in ASP
How to combine text and HTML tags with ASP.

Redirect the user to a different URL
How to redirect the user to a different URL.

Show a random link
How to create a random link.

Controlling the buffer
How to control the buffer.

Clear the buffer
How to clear the buffer.

End a script in the middle of processing and return the result
How to end a script in the middle of processing.

Set how many minutes a page will be cached in a browser before it expires
How to specify how many minutes a page will be cached in a browser before it expires.

Set a date/time when a page cached in a browser will expire
How to specify a date/time a page cached in a browser will expire.

Check if the user is still connected to the server
How to check if a user is disconnected from the server.

Set the type of content
How to specify the type of content.

Set the name of the character set
How to specify the name of the character set.



Response Object

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

Collections

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

Properties

PropertyDescription
BufferSpecifies whether to buffer the page output or not
CacheControlSets whether a proxy server can cache the output generated by ASP or not
CharsetAppends the name of a character-set to the content-type header in the Response object
ContentTypeSets the HTTP content type for the Response object
ExpiresSets how long (in minutes) a page will be cached on a browser before it expires
ExpiresAbsoluteSets a date and time when a page cached on a browser will expire
IsClientConnectedIndicates if the client has disconnected from the server
PicsAppends a value to the PICS label response header
StatusSpecifies the value of the status line returned by the server

Methods

MethodDescription
AddHeaderAdds a new HTTP header and a value to the HTTP response
AppendToLogAdds a string to the end of the server log entry
BinaryWriteWrites data directly to the output without any character conversion
ClearClears any buffered HTML output
EndStops processing a script, and returns the current result
FlushSends buffered HTML output immediately
RedirectRedirects the user to a different URL
WriteWrites a specified string to the output