Share via


PagesEnableSessionState 열거형

정의

단일 웹 페이지나 전체 웹 애플리케이션의 세션 상태 활성화를 결정하는 데 사용합니다.

public enum class PagesEnableSessionState
public enum PagesEnableSessionState
type PagesEnableSessionState = 
Public Enum PagesEnableSessionState
상속
PagesEnableSessionState

필드

False 0

세션 상태가 비활성화되어 있습니다.

ReadOnly 1

세션 상태가 활성화되어 있지만 쓸 수는 없습니다.

True 2

세션 상태가 활성화되어 있습니다.

예제

다음 구성 파일에서는 선언적으로 값을 사용 하는 방법을 보여 줍니다는 PagesEnableSessionState 세션 상태가 활성화 되어 있는지 여부를 지정 하는 열거형입니다.

<system.web>
  <pages enableSessionState="true" />
</system.web>

다음 코드 예제를 사용 하는 방법을 보여 줍니다 합니다 PagesEnableSessionState 열거형을 PagesSection 형식.

// 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

설명

이 열거형은 전체 웹 애플리케이션에 대 한 세션 상태 활성화를 결정합니다. 이 값에 사용할 수는 pages 웹 애플리케이션 구성 파일의 범위에 대 한 모든.aspx 페이지에 영향을 주도록 구성 파일 섹션입니다. 합니다 PagesSection 형식에 대 한 프로그래밍 방식의 액세스를 허용 합니다 pages 구성 섹션입니다.

적용 대상

추가 정보