
256
|
Chapter 12: The Page Class
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Notes
As with the Request and Response properties, while you can retrieve a local refer-
ence to the HttpServerUtility instance associated with the application, it is more
common to access this instance directly through the Server property, as shown in
this example.
Session
HttpSessionState = Page.Session
Returns an object that represents the current user session. A Session object is
maintained for each user that requests a page from an ASP.NET application. You
can store session-specific data in the Session object and then access it across
multiple pages in an ASP.NET application. For more information on the
HttpSessionState class, see Chapter 19.
Parameter
HttpSessionState
An HttpSessionState object that represents the current user session.
Example
The example uses the Session object to display the value of the Mode property,
which indicates where session state information is stored:
Sub Page_Load( )
Message.Text = "Current Session State Mode: " &_
Session.Mode.ToString( )
End Sub
Notes
As with the Request and Response properties, while you can retrieve a local refer-
ence to the HttpSessionState instance associated with the request, it is more
common to access this instance directly through the Session property, as shown in
this example.
SmartNavigation
Boolean ...