KaranGupta
asked on
Destroy a session
Hi
I have made a session Session["EmplID"]. This session stores the ID of an employee. Now I want to destory it and free the memory. If I use Session.abandon() then whole sessions will be finished. I don't want that. I want to finish this Session only.
What are the ways of doing that.
Kindly advice
Regards
Karan Gupta
I have made a session Session["EmplID"]. This session stores the ID of an employee. Now I want to destory it and free the memory. If I use Session.abandon() then whole sessions will be finished. I don't want that. I want to finish this Session only.
What are the ways of doing that.
Kindly advice
Regards
Karan Gupta
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Session.Remove("EmplID");
sorry anuragal , I havn't refresh the page
If you want it to get handled by normal garbage collection (GC) then can just set to nothing.
Session("EmpID") = Nothing
Session("EmpID") = Nothing