XML and ASP.NET
| only for RuBoard |
System.Web.SessionState.HttpSessionState
The System.Web.SessionState.HttpSessionState class (or session intrinsic object) provides a means to persist stateful information between requests for a single user . Table A.15 shows the properties of the HttpSessionState class, and Table A.16 shows its methods .
Table A.15. Properties of the System.Web.SessionState.HttpSessionState Class
| Property Name | Description |
|---|---|
| CodePage | Gets or sets the code page identifier for the current session. |
| Contents | Gets a reference to the current session state collection. |
| Count | Gets a count of items in the session state collection. |
| IsCookieless | Gets a value indicating if the session is cookieless, meaning the session ID is embedded in the URL. |
| IsNewSession | Gets a value indicating if the current request created the session. |
| IsReadOnly | Gets a value indicating if the session is read only. |
| Item | Gets a session variable value. |
| IsSynchronized | Gets a value indicating if the current session is thread safe. |
| Keys | Gets the collection of keys for the current session. |
| LCID | Gets the locale identifier (LCID) for the current session. |
| Mode | Gets one of the SessionStateMode enumeration members representing the current session state mode ( InProc , Off , SQLServer , or StateServer ). |
| SessionID | Gets the session ID for the current session. |
| StaticObjects | Gets the collection of objects defined in global.asax with the following tag:
<object runat="server" scope="session"> |
| Timeout | Gets or sets the number of minutes between requests until the current session times out. |
Table A.16. Methods of the System.Web.HttpSessionState Class
| Method Name | Description |
|---|---|
| Abandon | Tears down the current session. |
| Add | Adds an item to the session state collection. |
| Clear | Clears all values from the session state. |
| CopyTo | Copies the collection of session state values to an array. |
| GetEnumerator | Gets an enumerator to iterate through the collection of session state items. |
| Remove | Removes an item from the session state collection. |
| RemoveAll | Removes all items from the session state collection. |
| RemoveAt | Removes an item from the session state collection by index. |
| only for RuBoard |