HttpResponse 類別

定義

封裝來自 ASP.NET 作業的 HTTP 回應資訊。Encapsulates HTTP-response information from an ASP.NET operation.

public ref class HttpResponse sealed
public sealed class HttpResponse
type HttpResponse = class
Public NotInheritable Class HttpResponse
繼承
HttpResponse

範例

下列範例會在要求頁面時,繪製三個重迭的矩形。The following example draws three overlapping rectangles when the page is requested. 程式碼一開始會將ContentType屬性設定為 image/jpeg,讓整個頁面呈現為 jpeg 影像。The code begins by setting the ContentType property to image/jpeg, so that the entire page will be rendered as a JPEG image. 然後,程式碼會Clear呼叫方法,以確保不會與此回應一起傳送任何多餘的內容。The code then calls the Clear method to ensure that no extraneous content is sent with this response. 接下來,程式碼會BufferOutput將屬性設定為 true,讓頁面在傳送至要求的用戶端之前完整處理。Next, the code sets the BufferOutput property to true so that the page is completely processed before it is sent to the requesting client. 接著會建立用來繪製矩形的兩個物件: Bitmap Graphics和物件。Two objects used to draw the rectangles are then created: a Bitmap and a Graphics object. 在頁面中建立的變數會做為座標來繪製矩形,並使用出現在最大矩形內的字串。The variables created in the page are used as coordinates to draw the rectangles and a string that appears inside the largest rectangle.

繪製出現在其中的三個矩形和字串時, Bitmap會儲存Stream至與OutputStream屬性相關聯的物件,而且其格式會設定為 JPEG。When the three rectangles and the string that appears inside them are drawn, the Bitmap is saved to the Stream object that is associated with the OutputStream property and its format is set to JPEG. 程式碼會呼叫DisposeDispose方法,以釋放這兩個繪圖物件所使用的資源。The code calls the Dispose and Dispose methods to release the resources used by the two drawing objects. 最後,程式碼會呼叫Flush方法,將緩衝的回應傳送給要求的用戶端。Lastly, the code calls the Flush method to send the buffered response to the requesting client.

注意

在程式碼中HttpResponse ,關鍵字Response會參考物件。In code, the HttpResponse object is referred to by the keyword Response. 例如, Response.Clear()會參考HttpResponse.Clear方法。For example, Response.Clear() refers to the HttpResponse.Clear method. 類別具有一個名為Response的屬性,它會HttpResponse公開的目前實例。 PageThe Page class has a property that is named Response that exposes the current instance of HttpResponse.

<%@ Page Language="C#" %>
<%@ import Namespace="System.Drawing" %>
<%@ import Namespace="System.Drawing.Imaging" %>
<%@ import Namespace="System.Drawing.Drawing2D" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

    private void Page_Load(object sender, EventArgs e)
    {
// <snippet2>
        // Set the page's content type to JPEG files
        // and clears all content output from the buffer stream.
        Response.ContentType = "image/jpeg";
        Response.Clear();
    
        // Buffer response so that page is sent
        // after processing is complete.
        Response.BufferOutput = true;
// </snippet2>
    
        // Create a font style.
        Font rectangleFont = new Font(
            "Arial", 10, FontStyle.Bold);
    
        // Create integer variables.
        int height = 100;
        int width = 200;
    
        // Create a random number generator and create
        // variable values based on it.
        Random r = new Random();
        int x = r.Next(75);
        int a = r.Next(155);
        int x1 = r.Next(100);
    
        // Create a bitmap and use it to create a
        // Graphics object.
        Bitmap bmp = new Bitmap(
            width, height, PixelFormat.Format24bppRgb);
        Graphics g = Graphics.FromImage(bmp);
    
        g.SmoothingMode = SmoothingMode.AntiAlias;
        g.Clear(Color.LightGray);
    
        // Use the Graphics object to draw three rectangles.
        g.DrawRectangle(Pens.White, 1, 1, width-3, height-3);
        g.DrawRectangle(Pens.Aquamarine, 2, 2, width-3, height-3);
        g.DrawRectangle(Pens.Black, 0, 0, width, height);
    
        // Use the Graphics object to write a string
        // on the rectangles.
        g.DrawString(
            "ASP.NET Samples", rectangleFont,
            SystemBrushes.WindowText, new PointF(10, 40));
    
        // Apply color to two of the rectangles.
        g.FillRectangle(
            new SolidBrush(
                Color.FromArgb(a, 255, 128, 255)),
            x, 20, 100, 50);
    
        g.FillRectangle(
            new LinearGradientBrush(
                new Point(x, 10),
                new Point(x1 + 75, 50 + 30),
                Color.FromArgb(128, 0, 0, 128),
                Color.FromArgb(255, 255, 255, 240)),
            x1, 50, 75, 30);

// <snippet3>    
        // Save the bitmap to the response stream and
        // convert it to JPEG format.
        bmp.Save(Response.OutputStream, ImageFormat.Jpeg);
    
        // Release memory used by the Graphics object
        // and the bitmap.
        g.Dispose();
        bmp.Dispose();
    
        // Send the output to the client.
        Response.Flush();
// </snippet3>
    }

</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    </form>
</body>
</html>
<%@ Page Language="VB" %>
<%@ import Namespace="System.Drawing" %>
<%@ import Namespace="System.Drawing.Imaging" %>
<%@ import Namespace="System.Drawing.Drawing2D" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

   Private Sub Page_Load(sender As Object, e As EventArgs)
' <snippet2>
      ' Set the page's content type to JPEG files
      ' and clears all content output from the buffer stream.
      Response.ContentType = "image/jpeg"
      Response.Clear()
      
      ' Buffer response so that page is sent
      ' after processing is complete.
      Response.BufferOutput = True
' </snippet2>
      
      ' Create a font style.
      Dim rectangleFont As New Font( _
          "Arial", 10, FontStyle.Bold)
      
      ' Create integer variables.
      Dim height As Integer = 100
      Dim width As Integer = 200
      
      ' Create a random number generator and create
      ' variable values based on it.
      Dim r As New Random()
      Dim x As Integer = r.Next(75)
      Dim a As Integer = r.Next(155)
      Dim x1 As Integer = r.Next(100)
      
      ' Create a bitmap and use it to create a
      ' Graphics object.
      Dim bmp As New Bitmap( _
          width, height, PixelFormat.Format24bppRgb)
      Dim g As Graphics = Graphics.FromImage(bmp)
      
      g.SmoothingMode = SmoothingMode.AntiAlias
      g.Clear(Color.LightGray)
      
      ' Use the Graphics object to draw three rectangles.
      g.DrawRectangle(Pens.White, 1, 1, width - 3, height - 3)
      g.DrawRectangle(Pens.Aquamarine, 2, 2, width - 3, height - 3)
      g.DrawRectangle(Pens.Black, 0, 0, width, height)
      
      ' Use the Graphics object to write a string
      ' on the rectangles.
      g.DrawString("ASP.NET Samples", rectangleFont, SystemBrushes.WindowText, New PointF(10, 40))
      
      ' Apply color to two of the rectangles.
      g.FillRectangle( _
          New SolidBrush( _
              Color.FromArgb(a, 255, 128, 255)), _
          x, 20, 100, 50)
      
      g.FillRectangle( _
          New LinearGradientBrush( _
              New Point(x, 10), _
              New Point(x1 + 75, 50 + 30), _
              Color.FromArgb(128, 0, 0, 128), _
              Color.FromArgb(255, 255, 255, 240)), _
          x1, 50, 75, 30)

' <snippet3>      
      ' Save the bitmap to the response stream and
      ' convert it to JPEG format.
      bmp.Save(Response.OutputStream, ImageFormat.Jpeg)
      
      ' Release memory used by the Graphics object
      ' and the bitmap.
      g.Dispose()
      bmp.Dispose()
      
      ' Send the output to the client.
      Response.Flush()
' </snippet3>
   End Sub 'Page_Load

</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    </form>
</body>
</html>

備註

HttpResponse類別的方法和屬性會Response透過HttpApplicationHttpContextPageUserControl類別的屬性來公開。The methods and properties of the HttpResponse class are exposed through the Response property of the HttpApplication, HttpContext, Page, and UserControl classes.

只有在回傳案例中HttpResponse才支援類別的下列方法,而不是在非同步回送案例中:The following methods of the HttpResponse class are supported only in post back scenarios and not in asynchronous post back scenarios:

當您使用UpdatePanel控制項來更新頁面的選取區域,而不是以回傳更新整頁時,就會啟用部分頁面更新。Partial-page updates are enabled when you use UpdatePanel controls to update selected regions of a page instead of updating the whole page with a post back. 如需詳細資訊, 請參閱UpdatePanel 控制項總覽部分頁面呈現總覽For more information, see UpdatePanel Control Overview and Partial-Page Rendering Overview.

建構函式

HttpResponse(TextWriter)

初始化 HttpResponse 類別的新執行個體。Initializes a new instance of the HttpResponse class.

屬性

Buffer

取得或設定值,指出是否要緩衝輸出並在整個回應處理完成之後將它送出。Gets or sets a value indicating whether to buffer output and send it after the complete response is finished processing.

BufferOutput

取得或設定值,指出是否要緩衝輸出並在整個網頁處理完成之後送出。Gets or sets a value indicating whether to buffer output and send it after the complete page is finished processing.

Cache

取得網頁的快取原則 (例如,到期時間、隱私權設定與 Vary 子句)。Gets the caching policy (such as expiration time, privacy settings, and vary clauses) of a Web page.

CacheControl

取得或設定符合其中一個 HttpCacheability 列舉值的 Cache-Control HTTP 標頭。Gets or sets the Cache-Control HTTP header that matches one of the HttpCacheability enumeration values.

Charset

取得或設定輸出資料流的 HTTP 字元集。Gets or sets the HTTP character set of the output stream.

ClientDisconnectedToken

取得用戶端中斷連接時發生錯誤的 CancellationToken 物件。Gets a CancellationToken object that is tripped when the client disconnects.

ContentEncoding

取得或設定輸出資料流的 HTTP 字元集。Gets or sets the HTTP character set of the output stream.

ContentType

取得或設定輸出資料流的 HTTP MIME 類型。Gets or sets the HTTP MIME type of the output stream.

Cookies

取得回應 Cookie 集合。Gets the response cookie collection.

Expires

取得或設定瀏覽器上快取網頁到期以前的分鐘數。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. Expires 是提供來與 ASP 先前版本相容。Expires is provided for compatibility with earlier versions of ASP.

ExpiresAbsolute

取得或設定從快取中移除快取資訊的絕對日期和時間。Gets or sets the absolute date and time at which to remove cached information from the cache. ExpiresAbsolute 是提供來與 ASP 先前版本相容。ExpiresAbsolute is provided for compatibility with earlier versions of ASP.

Filter

取得或設定用來在傳輸之前修改 HTTP 實體主體的包裝篩選物件。Gets or sets a wrapping filter object that is used to modify the HTTP entity body before transmission.

HeaderEncoding

取得或設定 Encoding 物件,表示目前標頭輸出資料流的編碼方式。Gets or sets an Encoding object that represents the encoding for the current header output stream.

Headers

取得回應標頭的集合。Gets the collection of response headers.

HeadersWritten

取得指出是否已寫入回應標頭的值。Gets a value indicating whether the response headers have been written.

IsClientConnected

取得值,指出用戶端是否仍然與伺服器連接著。Gets a value indicating whether the client is still connected to the server.

IsRequestBeingRedirected

取得布林值,指出用戶端是否傳輸至新位置。Gets a Boolean value indicating whether the client is being transferred to a new location.

Output

允許文字輸出至連出 HTTP 回應資料流。Enables output of text to the outgoing HTTP response stream.

OutputStream

允許二進位輸出至連出 HTTP 內容主體。Enables binary output to the outgoing HTTP content body.

RedirectLocation

取得或設定 HTTP Location 標頭的值。Gets or sets the value of the HTTP Location header.

Status

設定傳回至用戶端的 Status 行。Sets the Status line that is returned to the client.

StatusCode

取得或設定傳回至用戶端的輸出之 HTTP 狀態碼。Gets or sets the HTTP status code of the output returned to the client.

StatusDescription

取得或設定傳回至用戶端的輸出之 HTTP 狀態字串。Gets or sets the HTTP status string of the output returned to the client.

SubStatusCode

取得或設定的值會評估回應的狀態碼是否合格。Gets or sets a value qualifying the status code of the response.

SupportsAsyncFlush

取得值,指出連接是否支援非同步清除作業。Gets a value that indicates whether the connection supports asynchronous flush operations.

SuppressContent

取得或設定值,指出是否送出 HTTP 內容至用戶端。Gets or sets a value indicating whether to send HTTP content to the client.

SuppressDefaultCacheControlHeader

取得或設定值,這個值表示是否要隱藏目前 HTTP 回應的預設 Cache Control: private 標頭。Gets or sets a value indicating whether to suppress the default Cache Control: private header for the current HTTP response.

SuppressFormsAuthenticationRedirect

取得或設定值,指定是否應該抑制表單驗證重新導向至登入頁面。Gets or sets a value that specifies whether forms authentication redirection to the login page should be suppressed.

TrySkipIisCustomErrors

取得或設定值,這個值會指定是否停用 IIS 7.0IIS 7.0 自訂錯誤。Gets or sets a value that specifies whether IIS 7.0IIS 7.0 custom errors are disabled.

方法

AddCacheDependency(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)

將 HTTP 標頭加入輸出資料流。Adds an HTTP header to the output stream. AddHeader(String, String) 是提供來與 ASP 先前版本相容。AddHeader(String, String) is provided for compatibility with earlier versions of ASP.

AddOnSendingHeaders(Action<HttpContext>)

註冊 ASP.NET 執行階段會立即在回應標頭傳送給這個要求之前叫用的回呼。Registers a callback that the ASP.NET runtime will invoke immediately before response headers are sent for this request.

AppendCookie(HttpCookie)

將 HTTP Cookie 加入至內建 Cookie 集合中。Adds an HTTP cookie to the intrinsic cookie collection.

AppendHeader(String, String)

將 HTTP 標頭加入輸出資料流。Adds an HTTP header to the output stream.

AppendToLog(String)

將自訂記錄資訊加入至網際網路資訊服務 (IIS) 記錄檔。Adds custom log information to the Internet Information Services (IIS) log file.

ApplyAppPathModifier(String)

如果工作階段使用 Cookieless 工作階段狀態並且傳回合併的路徑,則將工作階段 ID 加入虛擬路徑。Adds a session ID to the virtual path if the session is using Cookieless session state and returns the combined path. 如果沒有使用 Cookieless 工作階段狀態,則 ApplyAppPathModifier(String) 會傳回原始虛擬路徑。If Cookieless session state is not used, ApplyAppPathModifier(String) returns the original virtual path.

BeginFlush(AsyncCallback, Object)

將目前已緩衝的回應傳送到用戶端。Sends the currently buffered response to the client.

BinaryWrite(Byte[])

將二進位字元的字串寫入 HTTP 輸出資料流。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.

DisableKernelCache()

停用目前回應的核心快取處理。Disables kernel caching for the current response.

DisableUserCache()

停用這個回應的 IIS 使用者模式快取。Disables IIS user-mode caching for this response.

End()

將目前所有受緩衝的輸出傳送到用戶端、停止網頁的執行,並引發 EndRequest 事件。Sends all currently buffered output to the client, stops execution of the page, and raises the EndRequest event.

EndFlush(IAsyncResult)

完成非同步的清除作業。Completes an asynchronous flush operation.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
Flush()

送出所有目前正在緩衝的輸出到用戶端。Sends all currently buffered output to the client.

FlushAsync()

以非同步方式將目前所緩衝的所輸出輸送到用戶端。Asynchronously sends all currently buffered output to the client.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
Pics(String)

附加 HTTP PICS-Label 標頭至輸出資料流。Appends a HTTP PICS-Label header to the output stream.

PushPromise(String)

此 API 可支援傳送推播確認給 HTTP 2.0 用戶端的應用程式。This API is to support applications sending push promises to HTTP 2.0 clients. 您可以在下列網址上,找到更多有關 Http2 伺服器推送的詳細資料:HTTP/2 Specification Section 8.2:Server Push (HTTP/2 規格第 8.2 節:伺服器推送。You can find more details regarding to Http2 server push at HTTP/2 Specification Section 8.2: Server Push.

PushPromise(String, String, NameValueCollection)

此 API 可支援傳送推播確認給 HTTP 2.0 用戶端的應用程式。This API is to support applications sending push promises to HTTP 2.0 clients. 您可以在下列網址上,找到更多有關 Http2 伺服器推送的詳細資料:HTTP/2 Specification Section 8.2:Server Push (HTTP/2 規格第 8.2 節:伺服器推送。You can find more details regarding to Http2 server push at HTTP/2 Specification Section 8.2: Server Push.

Redirect(String)

重新導向要求至新的 URL 並指定新的 URL。Redirects a request to a new URL and specifies the new URL.

Redirect(String, Boolean)

重新導向用戶端至新的 URL。Redirects a client to a new URL. 指定新 URL 和是否應該結束目前網頁的執行。Specifies the new URL and whether execution of the current page should terminate.

RedirectPermanent(String)

執行從要求之 URL 至指定之 URL 的永久重新導向。Performs a permanent redirection from the requested URL to the specified URL.

RedirectPermanent(String, Boolean)

執行從要求之 URL 至指定之 URL 的永久重新導向,並提供完成回應的選項。Performs a permanent redirection from the requested URL to the specified URL, and provides the option to complete the response.

RedirectToRoute(Object)

使用路由參數值,將要求重新導向至新的 URL。Redirects a request to a new URL by using route parameter values.

RedirectToRoute(RouteValueDictionary)

使用路由參數值,將要求重新導向至新的 URL。Redirects a request to a new URL by using route parameter values.

RedirectToRoute(String)

使用路由名稱,將要求重新導向至新的 URL。Redirects a request to a new URL by using a route name.

RedirectToRoute(String, Object)

使用路由參數值及路由名稱,將要求重新導向至新的 URL。Redirects a request to a new URL by using route parameter values and a route name.

RedirectToRoute(String, RouteValueDictionary)

使用路由參數值及路由名稱,將要求重新導向至新的 URL。Redirects a request to a new URL by using route parameter values and a route name.

RedirectToRoutePermanent(Object)

使用路由參數值,執行永遠從要求的 URL 重新導向至指定的 URL。Performs a permanent redirection from a requested URL to a new URL by using route parameter values.

RedirectToRoutePermanent(RouteValueDictionary)

使用路由參數值,執行永遠從要求的 URL 重新導向至指定的 URL。Performs a permanent redirection from a requested URL to a new URL by using route parameter values.

RedirectToRoutePermanent(String)

使用路由名稱,執行永遠從要求的 URL 重新導向至指定的 URL。Performs a permanent redirection from a requested URL to a new URL by using a route name.

RedirectToRoutePermanent(String, Object)

使用路由參數值以及對應到新 URL 的路由名稱,執行永遠從要求的 URL 重新導向至指定的 URL。Performs a permanent redirection from a requested URL to a new URL by using the route parameter values and the name of the route that correspond to the new URL.

RedirectToRoutePermanent(String, RouteValueDictionary)

使用路由參數值及路由名稱,執行永遠從要求的 URL 重新導向至指定的 URL。Performs a permanent redirection from a requested URL to a new URL by using route parameter values and a route name.

RemoveOutputCacheItem(String)

從快取移除與預設輸出快取提供者關聯的所有快取項目。Removes from the cache all cached items that are associated with the default output-cache provider. 此方法為靜態。This method is static.

RemoveOutputCacheItem(String, String)

使用指定的輸出快取提供者,移除所有與指定之路徑相關聯的輸出快取項目。Uses the specified output-cache provider to remove all output-cache items that are associated with the specified path.

SetCookie(HttpCookie)

因為 HttpResponse.SetCookie 方法僅供內部使用,所以您不應該在程式碼中呼叫它。Because the HttpResponse.SetCookie method is intended for internal use only, you should not call it in your code. 相反地,您可以呼叫 HttpResponse.Cookies.Set 方法,如下列範例所示。Instead, you can call the HttpResponse.Cookies.Set method, as the following example shows.
更新 Cookie 集合中的現有 Cookie。Updates an existing cookie in the cookie collection.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
TransmitFile(String)

將指定的檔案直接寫入 HTTP 回應輸出資料流,而不在記憶體中緩衝。Writes the specified file directly to an HTTP response output stream, without buffering it in memory.

TransmitFile(String, Int64, Int64)

將指定的檔案部分直接寫入 HTTP 回應輸出資料流,而不在記憶體中緩衝。Writes the specified part of a file directly to an HTTP response output stream without buffering it in memory.

Write(Char)

將字元寫入 HTTP 回應輸出資料流。Writes a character to an HTTP response output stream.

Write(Char[], Int32, Int32)

將字元的陣列寫入 HTTP 回應輸出資料流。Writes an array of characters to an HTTP response output stream.

Write(Object)

Object 寫入 HTTP 回應資料流。Writes an Object to an HTTP response stream.

Write(String)

將字串寫入 HTTP 回應輸出資料流。Writes a string to an HTTP response output stream.

WriteFile(IntPtr, Int64, Int64)

將指定檔案直接寫入 HTTP 回應輸出資料流。Writes the specified file directly to an HTTP response output stream.

WriteFile(String)

將指定的檔案內容直接寫入至 HTTP 回應輸出資料流,做為檔案區塊。Writes the contents of the specified file directly to an HTTP response output stream as a file block.

WriteFile(String, Boolean)

將指定的檔案內容直接寫入至 HTTP 回應輸出資料流,做為記憶體區塊。Writes the contents of the specified file directly to an HTTP response output stream as a memory block.

WriteFile(String, Int64, Int64)

將指定檔案直接寫入 HTTP 回應輸出資料流。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.

適用於