Share via


PagesSection.EnableSessionState 속성

정의

세션 상태가 활성화되었는지 여부 또는 읽기 전용인지 지정하는 값을 가져오거나 설정합니다.

public:
 property System::Web::Configuration::PagesEnableSessionState EnableSessionState { System::Web::Configuration::PagesEnableSessionState get(); void set(System::Web::Configuration::PagesEnableSessionState value); };
[System.Configuration.ConfigurationProperty("enableSessionState", DefaultValue="true")]
public System.Web.Configuration.PagesEnableSessionState EnableSessionState { get; set; }
[<System.Configuration.ConfigurationProperty("enableSessionState", DefaultValue="true")>]
member this.EnableSessionState : System.Web.Configuration.PagesEnableSessionState with get, set
Public Property EnableSessionState As PagesEnableSessionState

속성 값

PagesEnableSessionState

세션 상태가 활성화되었는지 여부 또는 읽기 전용인지를 지정하는 EnableSessionState 속성 값 중 하나입니다. 기본값은 True로, 세션 상태가 활성화되었음을 나타냅니다.

특성

예외

해당 값이 올바른 PagesEnableSessionState 열거형 값이 아닌 경우

예제

다음 코드 예제에서는 EnableSessionState 속성을 사용하는 방법을 보여 줍니다.

// Get the current EnableSessionState property value.
Console.WriteLine(
    "Current EnableSessionState value: '{0}'",
    pagesSection.EnableSessionState);

// Set the EnableSessionState property to
// PagesEnableSessionState.ReadOnly.
pagesSection.EnableSessionState =
    PagesEnableSessionState.ReadOnly;
' Get the current EnableSessionState property value.
Console.WriteLine( _
    "Current EnableSessionState value: '{0}'", pagesSection.EnableSessionState)

' Set the EnableSessionState property to
' PagesEnableSessionState.ReadOnly.
pagesSection.EnableSessionState = PagesEnableSessionState.ReadOnly

적용 대상

추가 정보