Latest web development tutorials

ASP Response Object

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


Examples

Try - Example

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

Use HTML tags to format text in ASP
This example demonstrates how to use ASP to text and HTML tags together.

Redirect users to a different URL
This example demonstrates how to redirect users to a different URL.

Shows random link
This example demonstrates how to create a random link.

Control Buffer
This example demonstrates how to control the buffer.

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

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

Settings page before the expiry time of the cache in the browser
This example demonstrates how the provisions before the expiry page in the browser cache time.

Settings page cache expiration date or time in a browser
This example demonstrates how to provide for the page cache expiration date or time in the browser.

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

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

Character Set Name
This example demonstrates how to provide the name of the character set.


Response Object

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

set

集合 描述
Cookies 设置 cookie 的值。如果 cookie 不存在,则创建 cookie ,并设置指定的值。

Attributes

属性 描述
Buffer 规定是否缓冲页面的输出。
CacheControl 设置代理服务器是否可以缓存由 ASP 产生的输出。
Charset 将字符集的名称追加到 Response 对象中的 content-type 报头。
ContentType 设置 Response 对象的 HTTP 内容类型。
Expires 设置页面在失效前的浏览器缓存时间(分钟)。
ExpiresAbsolute 设置浏览器上页面缓存失效的日期和时间。
IsClientConnected 指示客户端是否已从服务器断开。
Pics 向 response 报头的 PICS 标签追加值。
Status 规定由服务器返回的状态行的值。

method

方法 描述
AddHeader 向 HTTP 响应添加新的 HTTP 报头和值。
AppendToLog 向服务器日志条目的末端添加字符串。
BinaryWrite 在没有任何字符转换的情况下直接向输出写数据。
Clear 清除已缓冲的 HTML 输出。
End 停止处理脚本,并返回当前的结果。
Flush 立即发送已缓冲的 HTML 输出。
Redirect 把用户重定向到一个不同的 URL。
Write 向输出写指定的字符串。