Notes: httpresponse class

Source: Internet
Author: User
Tags http cookie

Httpresponse class

Description:
Encapsulate HTTP Response Information from ASP. NET operations.

Common constructor:

Httpresponse
Initialize a new instance of the httpresponse class.

Public attributes:

Buffer
Gets or sets a value indicating whether to buffer the output and send it after processing the entire response.

Bufferoutput
Gets or sets a value indicating whether to buffer the output and send it after processing the entire page.

Cache
Obtain the cache policy of a webpage (expiration time, confidentiality, and change clause ).

Cachecontrol
Set the cache-control HTTP header to public or private.

Charset
Gets or sets the HTTP Character Set of the output stream.

Contentencoding
Gets or sets the HTTP Character Set of the output stream.

Contenttype
Gets or sets the http mime type of the output stream.

Cookies
Obtain the response Cookie set.

Expires
Get or set the number of minutes before the page cached on the browser expires. If you return to this page before the page expires, the Cache version is displayed. Expires is provided to be compatible with ASP of previous versions.

Expiresabsolute
Gets or sets the absolute date and time when the cache information is removed from the cache. Expiresabsolute is provided to be compatible with ASP in earlier versions.

Filter
Gets or sets a packaging filter object that is used to modify the HTTP entity before transmission.

Headerencoding
Gets or sets an encoding object, which indicates the encoding of the current header output stream.

Isclientconnected
Obtain a value that indicates whether the client is still connected to the server.

Isrequestbeingredirected
Returns a Boolean value indicating whether the client is being transferred to a new location.

Output
Enables text output to the output HTTP Response stream.

Outputstream
Enable the binary output of the HTTP Content body.

Redirectlocation
Gets or sets the value of the HTTP "location" header.

Status
Set the status bar returned to the client.

Statuscode
Gets or sets the HTTP status code returned to the client.

Statusdescription
Gets or sets the HTTP status string returned to the client.

Suppresscontent
Gets or sets a value indicating whether to send HTTP content to the client.

Public method:
Addcachedependency
Associate a set of cache dependencies with the response. In this way, if the response is stored in the output cache and the specified dependency changes, the response can be invalidated.

Addcacheitemdependencies
Overloaded. The validity of the cache response depends on other items in the cache.

Addcacheitemdependency
The validity of the cache response depends on other items in the cache.

Addfiledependencies
Overloaded. The validity of the cache response depends on other items in the cache.

Addfiledependency
Add a single file name to the file name set. The current response depends on the set.

Addheader
Add an HTTP header to the output stream. Addheader is provided to be compatible with ASP of previous versions.

Appendcookie
Adds an HTTP cookie to an internal Cookie set.

Appendheader
Add the HTTP header to the output stream.

Appendtolog
Add custom log information to the Internet Information Service (IIS) log file.

Applyapppathmodifier
If the session uses cookieless session status, the session ID is added to the virtual path and the combined path is returned. If cookieless session status is not used, applyapppathmodifier returns the original virtual path.

Binarywrite
Write a binary string to the HTTP output stream.

Clear
Clears all content output from the buffer stream.

Clearcontent
Clears all content output from the buffer stream.

Clearheaders
Clears all headers in the buffer stream.

Close
Close the socket connection to the client.

End
Send all the current buffered output to the client, stop the execution of the page, and raise an endrequest event.

Equals
Overloaded. Determine whether the two object instances are equal. (Inherit from object .)

Flush
Send all the current buffer output to the client.

Gethashcode
Used as a hash function of a specific type. Gethashcode is applicable to hash algorithms and data structures (such as hash tables. (Inherit from object .)

GetType
Obtain the type of the current instance. (Inherit from object .)

Pics
Append a PICS-label HTTP header to the output stream.

Redirect
Overloaded. Redirects the client to a new URL.

Referenceequals
Determine whether the specified object instance is the same. (Inherit from object .)

Removeoutputcacheitem
The static method removes all cache items associated with the specified path from the cache.

Setcookie
Updates an existing cookie in the cookie set.

Tostring
Returns the string of the current object. (Inherit from object .)

Transmitfile
Write the specified file directly into the HTTP Response output stream, instead of buffering the file in the memory.

Write
Overloaded. Write information to the HTTP Response output stream.

Writefile
Overloaded. Write the specified file directly to the HTTP Response output stream.

Writesubstitution
You can insert a response replacement block into the response block to dynamically generate a specified response area for the cached OUTPUT response.

Protected methods:
Finalize
Allow objects to try to release resources and perform other cleanup operations before they are recycled. (Inherit from object .)

Memberwiseclone
Creates a superficial copy of the current object. (Inherit from object .)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.