ProfileSection.AutomaticSaveEnabled プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ユーザー プロファイル情報の変更をページ終了時に自動的に保存するかどうかを決定する値を取得または設定します。
public:
property bool AutomaticSaveEnabled { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("automaticSaveEnabled", DefaultValue=true)]
public bool AutomaticSaveEnabled { get; set; }
[<System.Configuration.ConfigurationProperty("automaticSaveEnabled", DefaultValue=true)>]
member this.AutomaticSaveEnabled : bool with get, set
Public Property AutomaticSaveEnabled As Boolean
プロパティ値
true プロファイル情報がページ終了時に自動的に保存される場合。それ以外の場合は false。 既定値は、true です。
- 属性
例
次のコード例は、 AutomaticSaveEnabled プロパティの使用方法を示しています。 このコード例は、 ProfileSection クラスに提供されるより大きな例の一部です。
// Get the current AutomaticSaveEnabled property value.
Console.WriteLine(
"Current AutomaticSaveEnabled value: '{0}'", profileSection.AutomaticSaveEnabled);
// Set the AutomaticSaveEnabled property to false.
profileSection.AutomaticSaveEnabled = false;
' Get the current AutomaticSaveEnabled property value.
Console.WriteLine( _
"Current AutomaticSaveEnabled value: '{0}'", profileSection.AutomaticSaveEnabled)
' Set the AutomaticSaveEnabled property to false.
profileSection.AutomaticSaveEnabled = false
注釈
AutomaticSaveEnabled プロパティがfalseされると、ProfileCommon クラスのSave メソッドがコードで呼び出されない限り、個々のプロファイルへの変更は保存されません。
AutomaticSaveEnabled プロパティがtrueされると、ProfileAutoSaving イベントにより、コードで自動保存動作をオーバーライドすることもできます。