Condividi tramite


TraceSection.Enabled Proprietà

Definizione

Ottiene o imposta un valore che indica se il servizio di traccia ASP.NET è abilitato.

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

Valore della proprietà

true se la traccia è abilitata; in caso contrario, false. Il valore predefinito è true.

Attributi

Esempio

Nell'esempio di codice seguente viene illustrato come utilizzare la Enabled proprietà . Questo esempio di codice fa parte di un esempio più ampio fornito per 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

Si applica a

Vedi anche