Using the Session Object
The main application programming interface for working with Session state is the HttpSessionState class. This object is exposed by the Page.Session, Context.Session, UserControl.Session, WebService.Session, and Application.Session properties. This means that you can access Session state from just about anywhere.
This HttpSessionState class supports the following properties (this is not a complete list):
• CookieMode—
Enables you to specify whether cookieless sessions are enabled. Possible values are AutoDetect, UseCookies, UseDeviceProfile, and UseUri.
• Count—
Enables you to retrieve the number of items in Session state.
• IsCookieless—
Enables you to determine whether cookieless sessions are enabled.
• IsNewSession ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access