Thursday, March 22, 2012

Session VAriables

If I declare a session variable: session("Link") and
later code: session("Link") = Nothing, will that free up
the space taken up by the variable? Or do you have to
abanden the session?

ThanksSession.Remove("Link")

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"brian" <bshannon@.lbrspec.com> wrote in message
news:143cf01c3f7f6$fd4d6870$a501280a@.phx.gbl...
> If I declare a session variable: session("Link") and
> later code: session("Link") = Nothing, will that free up
> the space taken up by the variable? Or do you have to
> abanden the session?
> Thanks
You can use the Session.Contents.Remove method to delete a single value.

The following MSDN link has more details:
http://msdn.microsoft.com/library/d...-us/iissdk/iis/
ref_vbom_sesomcr.asp

HTH
Chris [MSFT]

-------
>Content-Class: urn:content-classes:message
>From: "brian" <bshannon@.lbrspec.com>
>Sender: "brian" <bshannon@.lbrspec.com>
>Subject: Session VAriables
>Date: Fri, 20 Feb 2004 13:17:48 -0800
>Lines: 6
>Message-ID: <143cf01c3f7f6$fd4d6870$a501280a@.phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcP39v1LHCGeXncVT1qlfO3A0gmTfw==
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Path: cpmsftngxa07.phx.gbl
>Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:211898
>NNTP-Posting-Host: tk2msftngxa13.phx.gbl 10.40.1.165
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>If I declare a session variable: session("Link") and
>later code: session("Link") = Nothing, will that free up
>the space taken up by the variable? Or do you have to
>abanden the session?
>Thanks
hi,
there is also SEssion.Clear()
will clear the values of that keyname.
Session.abandon is the best bet... though

--
Thanks and Regards,

Amit Agarwal
Software Programmer(.NET)
"brian" <bshannon@.lbrspec.com> wrote in message
news:143cf01c3f7f6$fd4d6870$a501280a@.phx.gbl...
> If I declare a session variable: session("Link") and
> later code: session("Link") = Nothing, will that free up
> the space taken up by the variable? Or do you have to
> abanden the session?
> Thanks

--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.593 / Virus Database: 376 - Release Date: 2/20/2004

0 comments:

Post a Comment