Link to home
Start Free TrialLog in
Avatar of KaranGupta
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
ASKER CERTIFIED SOLUTION
Avatar of Anurag Agarwal
Anurag Agarwal
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Pratima
 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