静态和会话变量之间的区别 [英] difference between static and session variables

查看:57
本文介绍了静态和会话变量之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在回发之间存储gridview和数据集。我应该通过静态和/或会话状态来做到这一点吗?哪个博客更好?为什么?

I have to store a gridview and a dataset between postbacks. Should I do it by means of static and or session state? Which is better for a blog? Why?

推荐答案

你也不存储。如果你有任何查询数据并重建网格所需的参数。
You don''t store either. If anything you persist the parameters necessary to query the data and reconstitute the grid.


静态变量共享所有用户,但是这个设施没有提供会话。

static变量保持值和会话而不是这样做。
Static variable share all user ,but session are not provided this facility.
static variable hold the value and session not this done.


这篇关于静态和会话变量之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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