asp.net.ph

PagesEnableSessionState Enumeration

System.Web.Configuration Namespace


.NET Framework version 2.0

Used to determine session-state activation for a single Web page or an entire Web application.

Members


Member Description
False Session state is disabled.
ReadOnly Session state is enabled, but not writable.
True Session state is enabled.

Remarks

This enumeration determines session-state activation for an entire Web application. This value can be used in the pages configuration-file section to affect all .aspx pages in the Web application for the scope of the configuration file. The PagesSection type allows programmatic access to the pages configuration section.

Example

The following configuration file excerpt shows how to declaratively use values of the PagesEnableSessionState enumeration to specify whether the session state is enabled.

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

The following code example shows how to use the PagesEnableSessionState enumeration with the PagesSection type.

// 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;
  C# VB
See Also

PagesSection Class Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph