Httpreponse is a class that is commonly used to process returned results after the server receives a request from the browser. First, the attribute
Buffer Gets or sets a value that indicates whether the output is buffered and sent after the entire response has been processed.
BufferOutput Gets or sets a value that indicates whether the output is buffered and sent after the entire page has been processed.
Cache Gets the caching policy for the Web page (ex: Expiration time, privacy settings, and change terms).
CacheControl Gets or sets the Cache-control HTTP header that matches one of the HttpCacheability enumeration values.
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 get a collection of response cookies.
Expires Gets or sets the number of minutes before the page that is cached on the browser expires. If the user returns the same page before the page expires, the cached version is displayed. Expires is provided to maintain compatibility with previous versions of ASP.
ExpiresAbsolute Gets or sets the absolute date and time that cache information is removed from the cache. ExpiresAbsolute is provided to maintain compatibility with previous versions of ASP.
Filter Gets or sets a wrapper filter object that is used to modify the HTTP entity principal before transmission.
HeaderEncoding Gets or sets an Encoding object that represents the encoding of the current header output stream.
Headers gets the collection of response headers.
IsClientConnected gets a value that indicates whether the client is still connected to the server.
Isrequestbeingredirected gets a Boolean value that indicates whether the client is being transferred to a new location.
Output is enabled to output the text of the HTTP response stream.
The outputstream enables binary output to the output HTTP content body.
Redirectlocation Gets or sets the value of the Http location header.
The status setting returns to the status bar of the client.
StatusCode Gets or sets the HTTP status code of the output returned to the client.
Statusdescription Gets or sets the HTTP status string for the output returned to the client.
Substatuscode Gets or sets the value of a qualified response status code.
Suppresscontent Gets or sets a value that indicates whether HTTP content is sent to the client.
Tryskipiiscustomerrors Gets or sets a value that specifies whether IIS 7.0 custom errors are disabled.
Second, the method
Addcachedependency associates a set of cache dependencies with the response, which invalidates the response if it is stored in the output cache and the specified dependency changes.
AddCacheItemDependencies is overloaded. Makes the validity of the cached response dependent on other items in the cache.
AddCacheItemDependency makes the validity of cached responses dependent on other items in the cache.
AddFileDependencies is overloaded. Makes the validity of the cached response dependent on other items in the cache.
AddFileDependency adds a single file name to the file name collection, and the current response depends on the collection.
AddHeader adds an HTTP header to the output stream. AddHeader is provided to maintain compatibility with previous versions of ASP.
AppendCookie infrastructure. Adds an HTTP cookie to the internal Cookie collection.
Appendheader adds an HTTP header to the output stream.
AppendToLog Add custom log information to the Internet Information Services (IIS) log file.
Applyapppathmodifier if the session uses cookieless session state, the session ID is added to the virtual path and the combined path is returned. If you do not use cookieless session state, Applyapppathmodifier returns the original virtual path.
BinaryWrite writes a binary string into 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 closes the socket connection to the client.
Disablekernelcache disables the kernel cache for the current response.
End sends all current buffered output to the client, stops execution of the page, and raises the EndRequest event.
Flush sends all current buffered output to the client.
Pics appends an HTTP Pics-label header to the output stream.
Redirect is overloaded. Redirects the client to the new URL.
RemoveOutputCacheItem removes all cache entries associated with the specified path from the cache. This method is static.
Setcookie infrastructure. Updates an existing cookie in the cookie collection.
TransmitFile is overloaded. Writes the specified file directly to the HTTP response output stream without buffering the file in memory.
Write is overloaded. Writes information to the HTTP response output stream.
WriteFile is overloaded. Writes the specified file directly to the HTTP response output stream.
WriteSubstitution allows the response substitution block to be inserted into the response, allowing the specified response area to be dynamically generated for the cached output response.
. NET Learning Notes---httpresponse class