Share via


OutputCacheProfile.Enabled Eigenschaft

Definition

Ruft einen Wert ab, der angibt, ob die Zwischenspeicherung aktiviert ist, oder legt diesen fest.

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

Eigenschaftswert

Boolean

true, wenn die Zwischenspeicherung aktiviert ist, andernfalls false. Der Standardwert ist false.

Attribute

Beispiele

Im folgenden Codebeispiel wird die Verwendung der Enabled-Eigenschaft veranschaulicht.


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

Hinweise

Die Enabled Eigenschaft ermöglicht das Aktivieren oder Deaktivieren des Zwischenspeicherungsmechanismus nur an einer zentralen Stelle. Es wirkt sich auf alle Seiten oder Steuerelemente aus, die diese OutputCacheProfileVerwenden.

Gilt für

Siehe auch