保留页面刷新后的价值 [英] retain value after page refresh
问题描述
我正在使用C#一个按钮控件(确认键)。
我在我的项目定义了一些全局变量。
当我点击该按钮某种形式的验证情况和另一个按钮(保存按钮)得到明显。
问题是,当我点击确认按钮,当前页面刷新,全局变量不包含值。它显示为空。
我怎么CAL甚至在页面刷新保持全局变量的值。
I am using a button control("validation button") in c#. I define some global variable in my project. when I clicked the button some form validation happens and an another button("save button") gets visible. the problem is when i click the validation button, the current page refreshes and the global variable doesn't contain the values. it shows null. how cal i maintain the value in global variable even after page refresh.
推荐答案
我认为你需要使用会话状态的 http://msdn.microsoft.com/en-us/library/87069683(v = VS.80)的.aspx
I think you need to use Session State http://msdn.microsoft.com/en-us/library/87069683(v=vs.80).aspx
这篇关于保留页面刷新后的价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!