ProfileSection.Enabled プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
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
注釈
プロパティfalseが Enabled の場合、プロファイル機能は無効になり、ASP.NET コードからユーザー プロファイル情報にアクセスできなくなります。
プロパティが の場合、true実行時に、ASP.NET コンパイル システムは セクションで指定された情報をprofile使用して、 からProfileBase派生した というProfileCommonクラスを生成します。