The ASP Response Object   

The Response object is used to send the output back to the client (browser). It includes all the HTTP variables, cookies that will be stored on the client browser and other info about the content being sent.

Syntax :



Collections Description
 Cookies A collection used to specify the values of cookies which will be sent back to the client browser.
Properties Description
 Buffer A boolean value indicating whether page output is buffered or not. If the page's Response.Buffer property is set to true then the output from the page will not be sent to the client until all the script in that page is processed. Note that in IIS 5, Response.Buffer is by default set to true. So if you want to turn off buffering of your page's output then you will have to set Response.Buffer to false
CacheControl A string specifying that the output from the ASP should be cached or not. If you want proxy server to cache the output of your ASP then set this property to Public or if you don't want to enable caching of your ASP then set it to Private.
Charset A string which appends the name of character set to be used to HTTP-content-type header.
ContentType A string which specifies the HTTP content type for the response. If Response.ContentType is not specified then by default MIME-type "text/html" is used.
Expires An integer specifying the duration of time in minutes after which the page expires in the client browser cache.
ExpiresAbsolute Date / time after which the page cached in the client browser expires and is no longer valid e.g.  Response.ExpiresAbsolute = #March 31, 2001 12:00:00# 
IsClientConnected A boolean value indicating whether the client is still connected to this particular page. If this property returns false then the page's script processing can be stopped by using Response.End method.
Pics A string which creates PICS header and then adds it to the HTTP headers. It indicates PICS content rating e.g. violence, sex etc.
Status A string which specifies the value of status line of the server. It is included in HTTP headers of the response. This string should contain both three digit code and a brief explanation for it e.g. "404 File Not Found".
Methods Description
 AddHeader Adds a custom new HTTP header to the response. Must be used before any text or HTML is sent to the client. Does not replace a HTTP header of the same name e.g. Response.AddHeader "AUTHENTICATED", "You are now logged on."
AppendToLog A string which is added to the end of the web server log entry for this page e.g. Response.AppendToLog "Your custom log message goes here".
BinaryWrite Writes down the given information to the current HTTP output without any character set conversion. It is useful for writing non-string information such as binary data required by an application or for sending bytes to make up an image.
Clear Erases any existing HTML buffered output from the IIS response buffer. Used to abort the partly completed page.
End Stops the processing of the script in the current page and sends the already created content to the client. Further processing of the page is aborted.
Flush Sends the buffered output immediately to the client. It is opposite to that of Response.Clear which erases the currently buffered content. Is used to send parts of long pages to the client when Response.Buffer is set to true.
Redirect Redirects the browser to another page (URL) e.g. Response.Redirect "".
Write Writes the specified string to the web page e.g. Response.Write "Hello World!".

It's easy... it's a PSACAKE!
Back | Tell A Friend | Search this Site
1998 - 2014
Version 3.23

Send me One Million FREE Guaranteed Visitors