Hi All the members in DaniWeb :cool:

I need to know how to end a created session when user log out from the web site..I have
created a web-site for my assignment..and i put Sessions..Each time user log in to system
it create session object and identifies the user..
What i need to know is i want to add some codes , when user log out from the web..( I think i need to destroy the created Session object.. ).
can any one help..Its not for assignment..its for my knowledge...
Thanks Everyone

Little addition to Scott's post. Session.Abandon() method cancels the current session and create a new session on next request.

commented: hey buddy! its been a while :) +7

Session["Login"] = "true"; Creating

selected if (Session["Login"] != null)

Session["Login"].Abandon() Deleting

commented: Way to get your sig links out there! -1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.