共用方式為


OutputCacheProfile.Enabled 屬性

定義

取得或設定一個值,指示是否啟用快取。

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的頁面或控制項。

適用於

另請參閱