다음을 통해 공유


Response Object

You can use the Response object to send output to the client.

Methods

The Response object defines the following methods.

Method

Description

Response.AddHeader

Sets the HTML header name to value.

Response.AppendToLog

Adds a string to the end of the Web server log entry for this request.

Response.BinaryWrite

Writes the given information to the current HTTP output without any character-set conversion.

Response.Clear

Erases any buffered HTML output.

Response.End

Stops processing the .asp file and returns the current result.

Response.Flush

Sends buffered output immediately.

Response.Redirect

Sends a redirect message to the browser, causing it to attempt to connect to a different URL.

Response.Write

Writes a variable or text to the current HTTP output as a string.

Properties

The Response object defines the following properties.

Property

Description

Response.Buffer

Indicates whether page output is buffered.

Response.CacheControl

Sets a header to notify proxy servers or other cache mechanisms whether they can cache the output generated by ASP.

Response.Charset

Appends the name of the character set to the content-type header. The character set specifies for the browser how to display characters.

Response.CodePage

Sets the code page for data in the intrinsic objects for one response. The code page specifies for the server how to encode characters for different languages.

Response.ContentType

Specifies the HTTP content type for the response.

Response.Cookies Collection

Specifies cookie values. Using this collection, you can set cookie values.

Response.Expires

Specifies the length of time before a page cached on a browser expires.

Response.ExpiresAbsolute

Specifies the date and time on which a page cached on a browser expires.

Response.IsClientConnected

Indicates whether the client has reset the connection to the server.

Response.LCID

Sets the LCID for data for one response. The LCID refers to how dates, times, and currency are formatted for a specific geographical locale.

Response.PICS

Set the value for the pics-label response header to indicate the PICS content rating.

Response.Status

The value of the status line returned by the server.

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

See Also