Home All Groups Group Topic Archive Search About

Multiple sessions, how to kill only one

Author
10 Oct 2006 7:30 PM
Mangler
I have 2 sessions that get created.  One when the user logs in called
"uname" and another called "idrma" when that user choses to begin a
repair request.  I know <%session.abandon%>  will kill both sessions,
how to I only target one?

Author
10 Oct 2006 7:36 PM
Mike Brind
"Mangler" <dwald***@directwireless.com> wrote in message
news:1160508629.445274.188010@e3g2000cwe.googlegroups.com...
>I have 2 sessions that get created.  One when the user logs in called
> "uname" and another called "idrma" when that user choses to begin a
> repair request.  I know <%session.abandon%>  will kill both sessions,
> how to I only target one?
>

You mean two session VARIABLES.

To create a session variable: Session("Uname") = "Some value"

To "kill" it: Session("Uname") = ""

--
Mike Brind
Are all your drivers up to date? click for free checkup

Author
10 Oct 2006 7:58 PM
Mangler
<% Session.Contents.Remove("uname") %>

Would this work the same?


Mike Brind wrote:
Show quoteHide quote
> "Mangler" <dwald***@directwireless.com> wrote in message
> news:1160508629.445274.188010@e3g2000cwe.googlegroups.com...
> >I have 2 sessions that get created.  One when the user logs in called
> > "uname" and another called "idrma" when that user choses to begin a
> > repair request.  I know <%session.abandon%>  will kill both sessions,
> > how to I only target one?
> >
>
> You mean two session VARIABLES.
>
> To create a session variable: Session("Uname") = "Some value"
>
> To "kill" it: Session("Uname") = ""
>
> --
> Mike Brind
Author
10 Oct 2006 8:20 PM
Mike Brind
Yes. No.  My method retains the session variable, but sets its value to an
empty string.  Yours removes it altogether from the collection.

You can test the content/value of your session variables like this:

For each x in Session.Contents
Response.Write x & ": " & Session.Contents(x) & "<br />"
Next

--
Mike Brind

Show quoteHide quote
"Mangler" <dwald***@directwireless.com> wrote in message
news:1160510317.847059.132120@m7g2000cwm.googlegroups.com...
> <% Session.Contents.Remove("uname") %>
>
> Would this work the same?
>
>
> Mike Brind wrote:
>> "Mangler" <dwald***@directwireless.com> wrote in message
>> news:1160508629.445274.188010@e3g2000cwe.googlegroups.com...
>> >I have 2 sessions that get created.  One when the user logs in called
>> > "uname" and another called "idrma" when that user choses to begin a
>> > repair request.  I know <%session.abandon%>  will kill both sessions,
>> > how to I only target one?
>> >
>>
>> You mean two session VARIABLES.
>>
>> To create a session variable: Session("Uname") = "Some value"
>>
>> To "kill" it: Session("Uname") = ""
>>
>> --
>> Mike Brind
>

Bookmark and Share