我可以将Datatable存储到ViewState中,记录为50,000。 [英] Can i store the Datatable into ViewState with the records of 50,000.

查看:85
本文介绍了我可以将Datatable存储到ViewState中,记录为50,000。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将数据表存储到viewstate中,以便下次我可以从viewstate获取记录而不是从数据库中获取新查询,但它在Localhost上工作得非常好,但在服务器上它花费了太多时间代码和相同的SP。



或告诉我有没有其他方法可以做同样的事情,这样我就可以从客户端获取数据,而不会在服务器上重复点击。

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.

推荐答案

为什么要将它存储在ViewState中?



对于这种情况人们大多使用会话作为更好的选择。有关详细信息,请访问以下链接:在ASP.NET中探索会话 [ ^ ]
Why you want to store it in a ViewState??

For this kind of scenarios people mostly use sessions as better option. For details check this link: Exploring Session in ASP.NET[^]


这篇关于我可以将Datatable存储到ViewState中,记录为50,000。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆