Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Asp.Net and Session - some Interesting Facts

Reply
Thread Tools

Asp.Net and Session - some Interesting Facts

 
 
vikram.lakhotia@gmail.com
Guest
Posts: n/a
 
      09-30-2007
Hi,
Yesterday I was discussion with my colleagues about session and a few
interesting things popped up. So I thought I would share the same with
all.

<a href=http://www.vikramlakhotia.com/
A_few_interesting_things_about_session_in_AspNet.a spx>
http://www.vikramlakhotia.com/A_few_interesting_things_about_session_in_AspNet.a spx</a>

Vikram
<A href=http://www.vikramlakhotia.com> http://www.vikramlakhotia.com</a>
<A href=http://JustLikeThat.vikramlakhotia.com>http://
JustLikeThat.vikramlakhotia.com</a>
<A href=http://WhyNot.vikramlakhotia.com>http://
WhyNot.vikramlakhotia.com</a>

 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?G=F6ran_Andersson?=
Guest
Posts: n/a
 
      09-30-2007
wrote:
> Hi,
> Yesterday I was discussion with my colleagues about session and a few
> interesting things popped up. So I thought I would share the same with
> all.
>
> <a href=http://www.vikramlakhotia.com/
> A_few_interesting_things_about_session_in_AspNet.a spx>
> http://www.vikramlakhotia.com/A_few_interesting_things_about_session_in_AspNet.a spx</a>



> Session Class has two methods. Session.Abondon() and Session.Clear().
> Both the methods are used to clear the data in the session. Both the
> methods clear the data in the session.


No, they don't. Session.Clear removes the session variables, but
Session.Abandon doesn't remove anything at all from the session, it only
flags the session object to be abandoned after the request has been handled.

> But there is one difference between them. Session.Abondon() will
> Session_end event will be fired and session_start event will be fired
> on the next request.


Yes, of course. Abandoning the session will end it, and the next request
will start a new session. Clearing the session variables doesn't end the
session.

--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      09-30-2007
<> wrote in message
news: ups.com...

> Session Class has two methods. Session.Abondon() and Session.Clear().


Firstly, it's Abandon, not Abondon...

Secondly, the Session object has eight methods, not two:
http://msdn2.microsoft.com/en-us/lib...on(vs.80).aspx

And thirdly (as Göran has pointed out), your distinction between the
Abandon() and Clear() methods is incorrect...

I suggest you remove the blog entry...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TVNZ Replay TV some FACTS. Penguin Man NZ Computing 0 11-09-2011 08:17 AM
Interesting facts and information about SP1 Clayton Windows 64bit 21 12-15-2007 03:14 AM
Some Interesting Facts You Would Love To Know Amy Digital Photography 0 03-07-2007 09:02 PM
Facts and Fallacies of Software Engineering Casey Hawthorne Java 0 11-23-2004 08:36 PM
3 Interesting Uselss Facts to tease your brain. Jeff Ellis Computer Support 1 07-29-2004 10:23 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57