尽量减少使用ViewState的TreeView控件 [英] Minimize ViewState with TreeView
问题描述
任何实际提示/如何做到这一点的招数?
Any practical tips/tricks on how to do that?
这似乎并不认为有一个关于如何做到这一点很多信息。
我从数据库将数据加载到TreeView和节点的最大数量将是100左右,我仍然有兴趣在减少ViewState的。
It doesn't seem that there is a lot of information about how to do that. I am loading data from the database into TreeView and the max number of nodes will be around 100. I am still interested in minimizing the ViewState.
我也将被添加和动态删除节点(尽管用户交互)。
I will also be adding and deleting nodes dynamically (though the user interaction).
谢谢!
PS:我用asp.net 2.0,C#,web表单(所以不要给我说涉及到对ASP MVC提示仅)
PS: I am using asp.net 2.0, c#, webforms (so don't give me tips that relate to to ASP MVC only)
推荐答案
下面是一个美妙的方式只得到来自电线发送每一回后摆脱视图状态。基本上,它存储了完整视图状态作为服务器上的会话变量和仅传输在视图状态字段的标识符。
here is a wonderful way to just get rid of viewstate from being sent over wire for each post-back. basically, it stores the complete viewstate as a session variable on the server and only transfers the identifier in the viewstate field.
COM pression将点点节省您在带宽方面,而把获得的视图状态出来的页面将有相当显着的性能提升。
compression will save you little bit in terms of bandwidth whereas putting getting viewstate out of the page will have quite dramatic performance improvement
下面的文章解释了绩效评估指标几种技术,以及
eggheadcafe
the following articles explains several techniques with performance measurement metrics as well eggheadcafe
这篇关于尽量减少使用ViewState的TreeView控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!