HttpResponse.BufferOutput Egenskap

Definition

Hämtar eller anger ett värde som anger om utdata ska bufferas och skickas när hela sidan har bearbetats.

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

Egenskapsvärde

true om utdata till klienten buffrats; annars false. Standardvärdet är true.

Exempel

I följande exempel anges ContentType egenskapen för svaret på bild/jpeg, anropar Clear metoden för att ta bort annat innehåll som kan vara kopplat till svaret och anger BufferOutput sedan egenskapen till true så att hela sidan bearbetas innan innehåll skickas till den begärande klienten.

Ett fullständigt exempel finns i HttpResponse klassen .

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

Gäller för