ProfileSection.Enabled Eigenschap

Definitie

Hiermee wordt een waarde opgehaald of ingesteld die aangeeft of de ASP.NET profielfunctie is ingeschakeld.

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

Waarde van eigenschap

true als het compilatiesysteem van de ASP.NET een ProfileCommon-klasse moet genereren die kan worden gebruikt voor toegang tot informatie over afzonderlijke gebruikersprofielen; anders false. De standaardwaarde is true.

Kenmerken

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u de Enabled eigenschap gebruikt. Dit codevoorbeeld maakt deel uit van een groter voorbeeld voor de ProfileSection klasse.


// Get the current Enabled property value.
Console.WriteLine(
    "Current Enabled value: '{0}'", profileSection.Enabled);

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

' Get the current Enabled property value.
Console.WriteLine( _
    "Current Enabled value: '{0}'", profileSection.Enabled)

' Set the Enabled property to false.
profileSection.Enabled = false

Opmerkingen

Wanneer de eigenschap Enabled is false, is de profielfunctie uitgeschakeld en hebt u geen toegang tot gebruikersprofielgegevens uit uw ASP.NET code.

Wanneer de eigenschap is true, gebruikt het ASP.NET compilatiesysteem de informatie die is opgegeven in de sectie profile om een klasse te genereren met de naam ProfileCommon, die is afgeleid van ProfileBase.

Van toepassing op

Zie ook