ProfileSection.AutomaticSaveEnabled プロパティ

定義

ユーザー プロファイル情報の変更をページ終了時に自動的に保存するかどうかを決定する値を取得または設定します。

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 イベントにより、コードで自動保存動作をオーバーライドすることもできます。

適用対象

こちらもご覧ください