If I was you, I would analyze the code and try not to store the whole dataset in neither session, not viewstate - there must be a way to optimize your code.
Storing a dataset in viewstate or session is ill-advised, but out of the two, storing it in session is definitely better than viewstate. Since then the serialization/de-serialization is handled at the server. Rather than sending the serialized data to the client as well.
If you want to store the whole dataSet there is always the Caching
method wich will allow you to store huge variable with good performance.
Here an example of how you can store a variable into Cache.
And this how to retrive the variable after:string cachedString;
cachedString = (string)Cache["CacheItem"];
|
No comments:
Post a Comment