How to kill session?
Answers were Sorted based on User's Feedback
Answer / mayank rawat
session.abandon();
http://general--tips.blogspot.com
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / dhana sekhar
session.abandon()---this is used to destroy the all the
objects stored in a session.and realese the all the
resources.
session.clear()--used to cleare the session variables
Ex:session["a"]=null;
session.remove()--used to delete an item from seesion-
collection
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / phani krishna
You can Kill the session mainly by two ways
1. Session.Clear():
2. Session.RemoveAll();
3. Session.Remove();
Session.Clear() & Session.RemoveAll(): both are used to
clear all the values from session But Not Session Object.
Session.Remove() is used to remove the sessions from
particular session id only.
4. Session.Abound(): this method is used to kill the object
it self, Mean you can't find the session with the session
name and it will remove the values from session.
Eg: I have a session["mysess1"]="xxx";
session["mysess2"]="yyy";
if i use the method to kill the session by the method of
Session.Abound();
You can't find any more session which is created before the
session.Abound() method.
if u try to access session["mysess1"] it give error.
If u come for Session.Clear(); & Session.RemoveAll();
this mean the values of the sessions will clear but object
will exist.
If u come for Session.Remove();
It is used to clear the values from particular session only..
eg: Session.Remove(sessionName);
It will clear the particular session name values only..
Depend on your Application Requirement you can select any
one of the way..
But don't go for Session.Abound();
Until you don't want all the sessions and it's objects in
your current application.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sachin ambare
You can use
Session.RemoveAll()
Session.Clear()
Session.Abandon()
| Is This Answer Correct ? | 0 Yes | 1 No |
WE CAN KILL THE SESSION WITH SESSION.ABANDON()
USING ABOVE METHOD WE CAN KILL THE SESSIONS
| Is This Answer Correct ? | 0 Yes | 1 No |
What is a Managed Data?
Explain the difference between Web Garden and Web Farm?
0 Answers Sans Pareil IT Services,
What is the difference between rest and restful?
What is autopostback true?
How can you register a custom server control to a web page?
Explain the difference between inline and code behind - which is best in?
What is the relationship(in oops) between codebehind and inline code(.aspx to .aspx.cs)??? explain
What?s the difference between Response.Write() andResponse.Output.Write()?
How do you initiate validation on the server manually? What are two situations when you might you want to do that?
What is the basic purpose of the required field validator? How can you use a required field validator to check that the user changes the initial value of a text box? a listbox?
what is aspcompat? what it does?
What is round trip in asp.net?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)