HttpResponse.BufferOutput Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau menetapkan nilai yang menunjukkan apakah akan buffer output dan mengirimkannya setelah halaman lengkap selesai diproses.
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
Nilai Properti
true jika output ke klien di-buffer; jika tidak false. Defaultnya adalah true.
Contoh
Contoh berikut mengatur ContentType properti untuk respons terhadap gambar/jpeg, memanggil Clear metode untuk menghapus konten lain yang mungkin dilampirkan ke respons, lalu mengatur properti ke true sehingga seluruh halaman akan diproses BufferOutput sebelum konten apa pun dikirim ke klien yang meminta.
Untuk contoh lengkapnya, lihat HttpResponse kelas .
// 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