Home > DeveloperSection > Forums > Recreate a Session by Using Your Session ID
Jayden Bell
Jayden Bell

Total Post:110

Posted on    August-26-2014 2:35 AM


 1 Reply(s)
 810  View(s)
Rate this:

I would like to know if ASP.NET has something similar to session_id function from PHP.

I would like to do something like it using ASP.NET:



if ($_SESSION['mydata'] != 'somepreviousvaluesetted') {

        header("HTTP/1.0 404 Not Found");



Sumit Kesarwani

Total Post:378

Posted on    August-26-2014 5:03 AM

Hi Jayden, 

The session object has a SessionID property, but it does not give you the ability to start a session; however, in global.asax, there is a Session_Start handler which fires when the session does start. The session starts when the user accesses the application.

Don't want to miss updates? Please click the below button!

Follow MindStick