다음을 통해 공유


ProfileSection.Enabled 속성

정의

ASP.NET 프로필 기능을 사용할 수 있는지 여부를 나타내는 값을 가져오거나 설정합니다.

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

속성 값

ASP.NET 컴파일 시스템에서 개별 사용자 프로필에 대한 정보에 액세스하는 데 사용할 수 있는 클래스를 생성해야 하면 이고, 그렇지 않으면 />입니다. 기본값은 true입니다.

특성

예제

다음 코드 예제에서는 속성을 사용 하는 방법을 보여 있습니다 Enabled . 이 코드 예제는 클래스에 제공된 더 큰 예제의 ProfileSection 일부입니다.


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

설명

속성이 Enabled 있으면 false프로필 기능이 비활성화되고 ASP.NET 코드에서 사용자 프로필 정보에 액세스할 수 없습니다.

속성이 true있는 경우 런타임에 ASP.NET 컴파일 시스템에서 섹션에 profile 지정된 정보를 사용하여 파생되는 ProfileBase클래스를 ProfileCommon생성합니다.

적용 대상

추가 정보