System.Web.SessionState.SessionIDManager.Decode Method

Decodes a URL-encoded session identifier obtained from a cookie or the URL.

Syntax

public virtual string Decode (string id)

Parameters

id
The session identifier to decode.

Returns

The decoded session identifier.

Remarks

This method is not intended to be called from application code.

This method is used internally by the System.Web.SessionState.SessionIDManager class to decode custom HttpSessionState.SessionID values created by classes that inherit the System.Web.SessionState.SessionIDManager class and override the SessionIDManager.CreateSessionID(System.Web.HttpContext) and SessionIDManager.Validate(string) methods. To ensure the fidelity of a custom session-identifier value retrieved from the HTTP request by the SessionIDManager.GetSessionID(System.Web.HttpContext) method, the System.Web.SessionState.SessionIDManager decodes the custom value using the erload:System.Web.HttpUtility.UrlDecode method.

Requirements

Namespace: System.Web.SessionState
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0