.aspx页面关闭时,如何保存控制值 [英] how can i save the control values when .aspx page is closed

查看:82
本文介绍了.aspx页面关闭时,如何保存控制值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

向网页添加新的asp:textbox控件

开始运行-> http://localhost:..... default.aspx页面

显示该文本框.我在文本框示例中输入了值:-sample

之后,我将关闭网页,然后再次打开,则意味着文本框无法保留该值.

add new asp:textbox control to the web page

start run-> http://localhost:.....default.aspx page

display that textbox. i entered value in to the textbox example:- sample

ofter i will close the webpage and again open means the textbox fail to keep the value .

how can i save the values.when webpage is closed.

推荐答案

如果要关闭页面而不是浏览器,则可以使用任何服务器端状态管理,例如会话或缓存或应用程序.如果要关闭浏览器,则必须使用Cookie来执行此操作.
If you are closing the page and not browser the you can use any server side state management like session or cache or application. If you are closing the browser then you will have to use cookies to do this.


这篇关于.aspx页面关闭时,如何保存控制值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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