Q:
I know that to destroy all sessions , i can use:
Session.Abandon()
According to my question.
but why there is n’t any equivalent method to destroy only one session. and i am supposed to use
Session.Remove("varName")
instead of.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First of all, you are talking about session variables, not sessions. Each user has one session and one
Sessionobject that you can store several variables in.You use the
Session.Abandonto abandon the session once the current request completes, which will remove theSessionobject.You use the
Session.Removemethod to remove one variable from theSessionobject.