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

プロパティ値

true ASP.NET コンパイル システムが、個々のユーザー プロファイルに関する情報にアクセスするために使用できる ProfileCommon クラスを生成する必要がある場合は 。それ以外の場合は false。 既定値は、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 というクラスを生成します。

適用対象

こちらもご覧ください