what is the correct way to get session id in C#
String sessionId ;
sessionId = Session.SessionID;
or
string sessionId = Request["http_cookie"];
sessionId = sessionId.Substring(sessionId.Length - 24);
Actually i am totally new to C# and just jumped in a project where i find the second code and by Google i found the first code so anyone please tell me what is the actual code to be used
correct way is:
HttpContext.Current.Session.SessionID