OutputCacheProfile.Enabled 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個值,指示是否啟用快取。
public:
property bool Enabled { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enabled", DefaultValue=true)]
public bool Enabled { get; set; }
[<System.Configuration.ConfigurationProperty("enabled", DefaultValue=true)>]
member this.Enabled : bool with get, set
Public Property Enabled As Boolean
屬性值
true如果啟用快取;否則,。 false 預設值為 false。
- 屬性
範例
以下程式碼範例說明如何使用該 Enabled 屬性。
// Get the current Enabled.
Boolean enabledValue =
outputCacheProfile.Enabled;
// Set the Enabled.
outputCacheProfile.Enabled =
false;
' Get the current Enabled property.
Dim enabledValue As [Boolean] = _
outputCacheProfile.Enabled
' Set the Enabled property.
outputCacheProfile.Enabled = False
備註
該 Enabled 特性允許在單一地點啟用或停用快取機制。 它影響所有使用此方法 OutputCacheProfile的頁面或控制項。