다음을 통해 공유


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

속성 값

세션 상태를 사용하거나 사용하지 않도록 설정하거나 읽기 전용으로 설정할지 여부를 지정하는 속성 값 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

적용 대상

추가 정보