Reputation: 5459
Suppose if there are multiple sessions on single page and out of them I want to clear values of only one session then how can I achieve this. Will Session.clear() clear all sessions' value or it will create ambiguity because of multiple session?
Upvotes: 2
Views: 423
Reputation: 52241
Session.Clear(); // Remove all keys and values from the session state collection of current user
Session.Remove("SessionName"); //Will remove particular session variable of current user
Upvotes: 2
Reputation: 1414
You have only one session for one user at a time. If you clear the session, you only clear the session for the current user visiting the page, not for everybody.
Upvotes: 8