共用方式為


HttpResponse.BufferOutput 屬性

定義

取得或設定值,指出是否要緩衝輸出並在整個網頁處理完成之後送出。

public:
 property bool BufferOutput { bool get(); void set(bool value); };
public bool BufferOutput { get; set; }
member this.BufferOutput : bool with get, set
Public Property BufferOutput As Boolean

屬性值

如果對用戶端的輸出有緩衝,則為 true,否則為 false。 預設為 true

範例

下列範例會設定 ContentType image/jpeg 回應的屬性、呼叫 Clear 方法移除可能附加至回應的其他內容,然後將 屬性設定 BufferOutput 為 true,讓整個頁面在傳送至要求用戶端之前進行處理。

如需完整範例,請參閱 HttpResponse 類別。

    // 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;
' 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

適用於