Forums

ASP

This topic is locked

Session Destruction

Posted 01 Aug 2001 00:21:53
1
has voted
01 Aug 2001 00:21:53 Aaron Jay posted:
I have created a seesion object within a page, and when i move around some of the areas of my site, I want that session variable to be wiped. This is for a particular reason:

Say for instance I want to look at a report for a specific person, session created. Then I can look through all of the reports for that person in that section, BUT say I want to enter another section, and have the user select again who they want to see, then I need to have a wiped session variable, so I dont see person number 1's details.

Does this make sense? Basically, I want to clean a session variable at will that I have created in a web page. How do I go about doing this?And how do I do it without wiping all the other session variables I have created?

Session.GetLostYou("specificITem"?

Replies

Replied 01 Aug 2001 14:19:25
01 Aug 2001 14:19:25 Joel Martinez replied:
one of two ways,
most people check for a session variable like this

<b>if session("somthing" = "" then</b>

so if you want it to be wiped, set it to ""

<b>session("something" = ""</b>

the more proper way is to use the abandon method of the session object

<b>session.abandon</b>

Joel Martinez

----------
Is this thing on?....

Reply to this topic