Partager via


TraceSection.Enabled Propriété

Définition

Obtient ou définit une valeur indiquant si le service de trace ASP.NET est activé.

public:
 property bool Enabled { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enabled", DefaultValue=false)]
public bool Enabled { get; set; }
[<System.Configuration.ConfigurationProperty("enabled", DefaultValue=false)>]
member this.Enabled : bool with get, set
Public Property Enabled As Boolean

Valeur de propriété

Boolean

true si le suivi est activé ; sinon, false. La valeur par défaut est true.

Attributs

Exemples

L'exemple de code suivant montre comment utiliser la propriété Enabled. Cet exemple de code fait partie d’un exemple plus grand fourni pour la TraceSection classe.


// Get the current Enabled property value.
Boolean enabledValue = traceSection.Enabled;

// Set the Enabled property to false.
traceSection.Enabled = false;

' Get the current Enabled property value.
Dim enabledValue As Boolean = traceSection.Enabled

' Set the Enabled property to false.
traceSection.Enabled = False

S’applique à

Voir aussi