Partager via


OutputCacheProfile.Enabled Propriété

Définition

Obtient ou définit une valeur indiquant si la mise en cache est activée.

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

Valeur de propriété

true si la mise en cache est activée ; sinon, false. La valeur par défaut est false.

Attributs

Exemples

L’exemple de code suivant montre comment utiliser la Enabled propriété.


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

Remarques

La Enabled propriété autorise uniquement l’activation ou la désactivation du mécanisme de mise en cache. Elle affecte toutes les pages ou contrôles qui utilisent ce OutputCacheProfilefichier .

S’applique à

Voir aussi