user1729807
user1729807

Reputation:

Global Variable and store it in Session

In win applications we can declare a Variable that access it in all of current form(sth like below code)

i want to fill a dataset in Page Load and keep dataset in Session and use it later

Is there any problem about memory in this way?(means if at a same time 100 user come to site and i should keep 100 dataset in Session)

namespace Store
{
    DataSet ds; // Global DataSet
    public partial class frmLoading : Form
    {
    //...

Upvotes: 3

Views: 355

Answers (1)

Aghilas Yakoub
Aghilas Yakoub

Reputation: 28970

You can use Cache class in order to share your data (Global Cache)

So with Cache you can use just one DataSet.

Link : http://msdn.microsoft.com/fr-fr/library/system.web.caching.cache.aspx

Session is dedicated for each conneted user

Upvotes: 2

Related Questions