我在Page_Load事件中把cookies的值写到页面中:
txt_address.Value = Request.Cookies["customer"]["address"].ToString();现在如果页面中一个文本框txt_address中的值变了的话,我想Cookies中的值也变,我在一个button_click事件中这样写:
Response.Cookies["customer"]["address"] = txt_address.Value;
但是分步执行时txt_address的值都不能改变,cookies的值也就不能变了,这是为什么呢?
txt_address.Value = Request.Cookies["customer"]["address"].ToString();现在如果页面中一个文本框txt_address中的值变了的话,我想Cookies中的值也变,我在一个button_click事件中这样写:
Response.Cookies["customer"]["address"] = txt_address.Value;
但是分步执行时txt_address的值都不能改变,cookies的值也就不能变了,这是为什么呢?
解决方案 »
- ASP.net页面中用什么控件可以显示excel啊
- js多次跳转(asp.net)急!急!急!!!!!
- 求助坛子里的朋友。权限如何与页面相关联
- 根据IP地址获取详细信息
- 求一C#连接SQL数据库的封装类,及其调用方法。
- response.redirect(string url,bool endresponse)能在新的页面中打开网页吗?
- 关于虚拟目录的问题
- 安装vs2005后的sql问题
- 都来看看 取<input type="file" value=""../>的值
- 分享一下关于使用Flash插件上传,显示SWF文件等的实例
- 求一个信息采集器,最近要做个医疗门户,要在其他网站采集信息,那个推荐下呀!!!
- ☆★☆ DbDataAdapter.Fill 方法的问题 ! 加急!!! ☆★☆
if(!IsPostBack)
{
}
中,否则你没次点击button_click页面就会重新加载一次,数据也就会初始化了。
//...... 处理取得的数据
} //...... 处理 赋值数据
{
txt_address.Value = Request.Cookies["customer"]["address"].ToString();
}
{}要做回传页判断