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

適用於

另請參閱