I am trying to store the datatable in to viewstate so that next time i can get the records from viewstate instead a new query from database, But it is working very good on Localhost but on server it is taking too much time with same code and same SPs.
or tell me is there any other way to do the same thing so that i can get the data from client side without any repeated hits on server.
Can i store the Datatable into ViewState with the records of
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jul 11, 2013, 11:45 PM EDT
Riyaz AkhtarRank #2,275 · 619 reputationPosted Jul 12, 2013, 1:59 AM EDT
if no of users is more in your application then session will also cause performance issue, so be careful when u choose session.
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 12, 2013, 3:04 AM EDT
If your resultant table contains more record then it will slow. Instead you can use table caching if you know that the result will be not change for different user.
Regards,
Iftikar
Ravi ShekharRank #673 · 3.6K reputationPosted Jul 12, 2013, 3:39 AM EDT
Viewstate is not good way to store datatable. Viewstate is not able to store huge records.
Regards,
ravi