共用方式為


PagesSection.Buffer 屬性

定義

取得或設定一個值,指定.aspx頁面和 .ascx 控制項是否使用回應緩衝。

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

屬性值

true如果.aspx頁面和 .ascx 控制項使用回應緩衝;否則,。 false 預設值為 true

屬性

範例

以下程式碼範例說明如何使用該 Buffer 屬性。

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

備註

當開啟回應緩衝時,頁面或控制項的輸出會被緩衝,直到整個頁面或控制項處理完畢。 如果效能是關鍵考量,就不要設定Buffertrue

適用於