如何在特定页面中管理会话值 [英] How to manage session values in particular page
问题描述
我必须知道,有一种更好的方法来处理特定页面中的会话值而不将它们赋为null或string.empty,我正在页面中创建动态控件,但是如果在某些情况下,如果用户创建了控件,它将移到另一页,则由于某些原因我将会话中的值保留在其中,他将能够再次创建控件,但是如果我不提交该页面,然后移至另一页,然后再次尝试提交,我将收到错误消息我的会话具有先前的值.
谢谢
I have to know that is there better way to handle the session values in particular page without assgining them null or string.empty ,i am creating dynamic controls in my page but if in certain cases if user create the controls and it will move to another page then he will enable to create controls again as i am holding there values in session due to certain reason ,but if i dont submit the page and then move to another page and come again and try to submit i got an error as my session holding pervious values.
Thanks
推荐答案
Cookies.
它们保存在客户端而不是服务器上,因此可用于两个会话/页面
Cookies.
These are held at the client rather than the server, so will be available for both sessions / pages
这篇关于如何在特定页面中管理会话值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!