System.Web.HttpResponse Members

The members of System.Web.HttpResponse are listed below.

See Also: Inherited members from System.Object

Public Constructors

Initializes a new instance of the System.Web.HttpResponse class.

Public Properties

Bufferbool.

Gets or sets a value indicating whether to buffer output and send it after the complete response is finished processing.

BufferOutputbool.

Gets or sets a value indicating whether to buffer output and send it after the complete page is finished processing.

[read-only]
CacheHttpCachePolicy.

Gets the caching policy (such as expiration time, privacy settings, and vary clauses) of a Web page.

CacheControlstring.

Gets or sets the Cache-Control HTTP header that matches one of the System.Web.HttpCacheability enumeration values.

Charsetstring.

Gets or sets the HTTP character set of the output stream.

ContentEncodingSystem.Text.Encoding.

Gets or sets the HTTP character set of the output stream.

ContentTypestring.

Gets or sets the HTTP MIME type of the output stream.

[read-only]
CookiesHttpCookieCollection.

Gets the response cookie collection.

Expiresint.

Gets or sets the number of minutes before a page cached on a browser expires. If the user returns to the same page before it expires, the cached version is displayed. HttpResponse.Expires is provided for compatibility with earlier versions of ASP.

ExpiresAbsoluteDateTime.

Gets or sets the absolute date and time at which to remove cached information from the cache. HttpResponse.ExpiresAbsolute is provided for compatibility with earlier versions of ASP.

FilterSystem.IO.Stream.

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

HeaderEncodingSystem.Text.Encoding.

Gets or sets an System.Text.Encoding object that represents the encoding for the current header output stream.

[read-only]
IsClientConnectedbool.

Gets a value indicating whether the client is still connected to the server.

[read-only]
IsRequestBeingRedirectedbool.

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

[read-only]
OutputSystem.IO.TextWriter.

Enables output of text to the outgoing HTTP response stream.

[read-only]
OutputStreamSystem.IO.Stream.

Enables binary output to the outgoing HTTP content body.

RedirectLocationstring.

Gets or sets the value of the Http Location header.

Statusstring.

Sets the Status line that is returned to the client.

StatusCodeint.

Gets or sets the HTTP status code of the output returned to the client.

StatusDescriptionstring.

Gets or sets the HTTP status string of the output returned to the client.

SuppressContentbool.

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

Public Methods

AddCacheDependency(System.Web.Caching.CacheDependency[])

Associates a set of cache dependencies with the response to facilitate invalidation of the response if it is stored in the output cache and the specified dependencies change.

AddCacheItemDependencies(ArrayList)

Makes the validity of a cached response dependent on other items in the cache.

AddCacheItemDependencies(string[])

Makes the validity of a cached item dependent on another item in the cache.

AddCacheItemDependency(string)

Makes the validity of a cached response dependent on another item in the cache.

AddFileDependencies(ArrayList)

Adds a group of file names to the collection of file names on which the current response is dependent.

AddFileDependencies(string[])

Adds an array of file names to the collection of file names on which the current response is dependent.

AddFileDependency(string)

Adds a single file name to the collection of file names on which the current response is dependent.

AddHeader(string, string)

Adds an HTTP header to the output stream. HttpResponse.AddHeader(string, string) is provided for compatibility with earlier versions of ASP.

AppendCookie(HttpCookie)

Adds an HTTP cookie to the intrinsic cookie collection.

AppendHeader(string, string)

Adds an HTTP header to the output stream.

AppendToLog(string)

Adds custom log information to the Internet Information Services (IIS) log file.

ApplyAppPathModifier(string) : string

Adds a session ID to the virtual path if the session is using System.Web.Configuration.SessionStateSection.Cookieless session state and returns the combined path. If System.Web.Configuration.SessionStateSection.Cookieless session state is not used, HttpResponse.ApplyAppPathModifier(string) returns the original virtual path.

BinaryWrite(byte[])

Writes a string of binary characters 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 from the buffer stream.

Close()

Closes the socket connection to a client.

End()

Sends all currently buffered output to the client, stops execution of the page, and raises the HttpApplication.EndRequest event.

Flush()

Sends all currently buffered output to the client.

Pics(string)

Appends a HTTP PICS-Label header to the output stream.

Redirect(string)

Redirects a request to a new URL and specifies the new URL.

Redirect(string, bool)

Redirects a client to a new URL. Specifies the new URL and whether execution of the current page should terminate.

static
RemoveOutputCacheItem(string)

Removes from the cache all cached items that are associated with the default output-cache provider. This method is static.

SetCookie(HttpCookie)

Updates an existing cookie in the cookie collection.

TransmitFile(string)

Writes the specified file directly to an HTTP response output stream, without buffering it in memory.

Write(char)

Writes a character to an HTTP response output stream.

Write(object)

Writes an object to an HTTP response stream.

Write(string)

Writes a string to an HTTP response output stream.

Write(char[], int, int)

Writes an array of characters to an HTTP response output stream.

WriteFile(string)

Writes the contents of the specified file directly to an HTTP response output stream as a file block.

WriteFile(string, bool)

Writes the contents of the specified file directly to an HTTP response output stream as a memory block.

WriteFile(IntPtr, long, long)

Writes the specified file directly to an HTTP response output stream.

WriteFile(string, long, long)

Writes the specified file directly to an HTTP response output stream.

WriteSubstitution(HttpResponseSubstitutionCallback)

Allows insertion of response substitution blocks into the response, which allows dynamic generation of specified response regions for output cached responses.