次の方法で共有


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 メソッドがコードで呼び出されない限りSave、個々のプロファイルへのProfileCommon変更は保存falseされません。 プロパティtrueが のAutomaticSaveEnabled場合、 イベントをProfileAutoSaving使用すると、コードで自動保存動作をオーバーライドすることもできます。

適用対象

こちらもご覧ください