ASP 回复对象


ASP Response 对象用于将输出从服务器发送到用户。


更多示例

使用 ASP 编写文本
如何使用 ASP 编写文本。

在 ASP 中使用 HTML 标记设置文本格式
如何使用 ASP 将文本和 HTML 标记结合起来。

将用户重定向到不同的 URL
如何将用户重定向到不同的 URL。

显示随机链接
如何创建随机链接。

控制缓冲区
如何控制缓冲区。

清除缓冲区
如何清除缓冲区。

处理中途结束脚本并返回结果
如何在处理过程中结束脚本。

设置页面过期前将在浏览器中缓存多少分钟
如何指定页面在过期之前将在浏览器中缓存多少分钟。

设置浏览器中缓存的页面过期的日期/时间
如何指定浏览器中缓存的页面过期的日期/时间。

检查用户是否仍然连接到服务器
如何检查用户是否与服务器断开连接。

设置内容类型
如何指定内容的类型。

设置字符集名称
如何指定字符集的名称。



响应对象

ASP Response 对象用于将输出从服务器发送到用户。其集合、属性和方法描述如下:

收藏

Collection Description
Cookies Sets a cookie value. If the cookie does not exist, it will be created, and take the value that is specified

特性

Property Description
Buffer Specifies whether to buffer the page output or not
CacheControl Sets whether a proxy server can cache the output generated by ASP or not
Charset Appends the name of a character-set to the content-type header in the Response object
ContentType Sets the HTTP content type for the Response object
Expires Sets how long (in minutes) a page will be cached on a browser before it expires
ExpiresAbsolute Sets a date and time when a page cached on a browser will expire
IsClientConnected Indicates if the client has disconnected from the server
Pics Appends a value to the PICS label response header
Status Specifies the value of the status line returned by the server

方法

Method Description
AddHeader Adds a new HTTP header and a value to the HTTP response
AppendToLog Adds a string to the end of the server log entry
BinaryWrite Writes data directly to the output without any character conversion
Clear Clears any buffered HTML output
End Stops processing a script, and returns the current result
Flush Sends buffered HTML output immediately
Redirect Redirects the user to a different URL
Write Writes a specified string to the output