Bagikan melalui


PagesSection.Buffer Properti

Definisi

Mendapatkan atau menetapkan nilai yang menentukan apakah .aspx halaman dan kontrol .ascx menggunakan buffering respons.

public:
 property bool Buffer { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("buffer", DefaultValue=true)]
public bool Buffer { get; set; }
[<System.Configuration.ConfigurationProperty("buffer", DefaultValue=true)>]
member this.Buffer : bool with get, set
Public Property Buffer As Boolean

Nilai Properti

true jika halaman .aspx dan kontrol .ascx menggunakan buffering respons; jika tidak, false. Defaultnya adalah true.

Atribut

Contoh

Contoh kode berikut menunjukkan cara menggunakan Buffer properti .

// Get the current Buffer property value.
Console.WriteLine(
    "Current Buffer value: '{0}'", pagesSection.Buffer);

// Set the Buffer property to true.
pagesSection.Buffer = true;
' Get the current Buffer property value.
Console.WriteLine( _
    "Current Buffer value: '{0}'", pagesSection.Buffer)

' Set the Buffer property to true.
pagesSection.Buffer = True

Keterangan

Saat buffering respons diaktifkan, halaman atau output kontrol di-buffer hingga seluruh halaman atau kontrol diproses. Jangan diatur Buffer ke true jika performa adalah pertimbangan utama.

Berlaku untuk