Re: Maintain Variable Values
Store it in the Application object with a key reference to a Session ID. You could store it in the Session object much easier, but, if you do so then it will be serialized and sent back to the client on each request. So if its a big dataset that would be a pain in the ass.
One could also store a static array of DataSets, and refer to each by Session ID index...
Re: Maintain Variable Values
How about Caching the dataset object?
Re: Maintain Variable Values
Quote:
Originally Posted by plenderj
You could store it in the Session object much easier, but, if you do so then it will be serialized and sent back to the client on each request. So if its a big dataset that would be a pain in the ass.
Why would a DataSet be sent to the client?
There is no need for it, or are all Session variables sent?
If they are why?
I thought Session variables stayed on the server and were associated with an active Session.
Re: Maintain Variable Values
Quote:
Originally Posted by GlenW
Why would a DataSet be sent to the client?
There is no need for it, or are all Session variables sent?
If they are why?
I thought Session variables stayed on the server and were associated with an active Session.
If I'm not mistaken, the Session ID only is sent to the client, and sent back to the server to identify the session information associated with that current browser session.
That all said, if the dataset you're storing in your session object is large, it's going to take quite a bit of server resources. Not good, especially if you're doing this for thousands of users!
That's why I had suggested caching the object. Btw, I'm not even sure if this dataset you want stored will be accessible to all users or just to one user.
Re: Maintain Variable Values
You also mentioned that the dataset should be available for future loads. Sessions end after a certain timeout periiod.
Re: Maintain Variable Values
Quote:
Originally Posted by mendhak
If I'm not mistaken, the Session ID only is sent to the client, and sent back to the server to identify the session information associated with that current browser session.
That's what I thought.
Quote:
Originally Posted by mendhak
That all said, if the dataset you're storing in your session object is large, it's going to take quite a bit of server resources. Not good, especially if you're doing this for thousands of users!
The DataSets may be large but the application is for intranet use with a very limited number of users, so that should not be a problem.
Re: Maintain Variable Values
Everything you insert into a Session object is serialised, Base64 encoded, and sent to the client in the VIEWSTRING. Take a look at the source code of html pages and you'll see sometimes it can get really really big.
Personally I would assign a SessionID to people. Then store all object in the Application object or whatever and list by SessionID...
Re: Maintain Variable Values
Quote:
Originally Posted by plenderj
Everything you insert into a Session object is serialised, Base64 encoded, and sent to the client in the VIEWSTRING.
No it isn't.
Session objects are held on the server.
The _VIEWSTATE holds values for controls on the page that have their EnableViewState property set to true, the default, and any ViewState variables you create.
Re: Maintain Variable Values
I have absolutely no idea why I wrote that :confused:
Re: Maintain Variable Values
Quote:
Originally Posted by plenderj
I have absolutely no idea why I wrote that :confused:
I've felt like that before, like when I said "Will you marry me?" and "'course I meant it". :)