다음을 통해 공유


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코드에서 클래스 메서드를 호출하지 않는 한 Save 개별 프로필에 ProfileCommon 대한 변경 내용이 저장되지 않습니다. 속성이 AutomaticSaveEnabled 있으면 trueProfileAutoSaving 이벤트는 코드가 자동 저장 동작을 재정의할 수도 있습니다.

적용 대상

추가 정보