This documentation is archived and is not being maintained.

HttpSessionState.SessionID Property

Gets the unique session ID used to identify the session.

[Visual Basic]
Public ReadOnly Property SessionID As String
public string SessionID {get;}
public: __property String* get_SessionID();
public function get SessionID() : String;

Property Value

The session ID.


[Visual Basic, C#, C++] The following example assigns the Session ID for the current request to a string variable.

[Visual Basic] 
Dim MySessionId As String
MySessionId = Session.SessionID

String MySessionId;
MySessionId = Session.SessionID;

String* MySessionId;
MySessionId = Session->SessionID;

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpSessionState Class | HttpSessionState Members | System.Web.SessionState Namespace