Dataset in viewstate

E

EDom

Hi,
I am storing dataset in viewstate between postbacks. But now my datasets are
getting bigger and is effecting the speed of the pages and making them
bigger. I can store it in session also but then if I open the same page in
another window then it will overwrite the session of the previous page. Is
there any better logic by which I can have datasets stored in memory
seperately for each page I open and also get cleared as the page is closed.
Regards,
Vineet
 
E

Eliyahu Goldin

Vineet,

If you only read into the dataset, consider reloading it from the database
on every postback.

If you can't do this, you can always keep several instances of dataset in
the session. Save every instance in a separate session variable and persist
the variable name or index in the viewstate.

Eliyahu
 
E

EDom

Hi,

When can I clear this data from session variables. As it will keep
growing...

Regards,
 

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