Session variables issue

E

EDom

Hi,
I store dataset for each page in the session and a reference to the session
key is stored in viewstate. But now on which event I should clear the
session variables. Because when the page is closed or I navigate to another
page the session variables still stays as long as even a single page remains
open of that application

Regards,
Vineet
 
K

KMA

Won't the session variables be deleted when the session ends? Isn't that the
bonus of automatic garbage collection?
 
S

Scott Allen

With the default settings, a session will time out after 20 minutes,
and the garbage collector will eventually free the memory the DataSet
is using. There is no 100% reliable machanism to know when a user has
left the site.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top