Aracılığıyla paylaş


HttpResponse.Clear Yöntem

Tanım

Arabellek akışındaki tüm içerik çıkışını temizler.

public:
 void Clear();
public void Clear ();
member this.Clear : unit -> unit
Public Sub Clear ()

Örnekler

Aşağıdaki örnek image/jpeg yanıtının özelliğini ayarlar ContentType , yanıta eklenmiş olabilecek diğer içeriği kaldırmak için yöntemini çağırır Clear ve ardından istekte bulunan istemciye herhangi bir içerik gönderilmeden önce sayfanın tamamının işlenmesi için özelliğini true olarak ayarlar BufferOutput .

Tam bir örnek için sınıfına HttpResponse bakın.

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

Açıklamalar

Clear yöntemi üst bilgi bilgilerini temizlemez.

Şunlara uygulanır

Ayrıca bkz.