Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have create session in two field how to abandon one field session?
Posted

If you use Session.Abandon then it will kill all your session variables.
if you want to remove only one session then use
C#
Session.Remove("test");
 
Share this answer
 
check this link

http://forums.asp.net/p/1096251/1655612.aspx[^]


hope it helps!

thanks
 
Share this answer
 
If Session.Abandon() is for all sessions, try setting the session to null instead:

Session["Name"] = null;


Please mark this as correct answer if it fixes your problem

Best regards,
Eduard
 
Share this answer
 
v2
Comments
deepakdynamite 25-Nov-11 5:27am    
This will work. :)
[no name] 25-Nov-11 5:37am    
of course it will :D
[no name] 25-Nov-11 5:37am    
Please mark as answer if it fixes your problem

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900