客户端状态管理中的viewstate和hiddenfiles和cookie之间的区别? [英] difference between viewstate and hiddenfiles and cookies in client side statemanagement?

查看:88
本文介绍了客户端状态管理中的viewstate和hiddenfiles和cookie之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


您能告诉我.net中状态管理概念中viewstate,hiddenfields和cookie之间的主要区别吗?

解决方案

我猜你是说隐藏字段"而不是"hiddenfiles".

请查看下面的" ASP.NET状态管理概述"链接.

http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx

http://msdn.microsoft.com/en-us/library/z1hkazw7.aspx

http://wiki.asp.net/page.aspx/30/state-management/


所有这3个. viewstate,Cookie和hiddenfeilds仅受客户端状态管理.
Cookies.
有关更多信息,请参见:
http://webhacking.org.ua/117.htm [ 财产.此属性允许自动保留页面
并控制每次访问服务器之间的状态.这意味着
页面回发之间保持控制值.
Viewstate使用_VIEWSTATE(隐藏的表单)实现
在每个页面上自动创建的字段.你
无法使用视图状态将数据传输到其他页面.


hi
can you please tell me the main differences among viewstate , hiddenfields and cookies in state management concept in .net ??

I guess you mean to say "Hidden fields" and not "hiddenfiles".

Have a look at below links for "ASP.NET State Management Overview".

http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx

http://msdn.microsoft.com/en-us/library/z1hkazw7.aspx

http://wiki.asp.net/page.aspx/30/state-management/


all these 3 ie. viewstate, cookies and hiddenfeilds comes under client side state management only.
Cookies.
for more refer:
http://webhacking.org.ua/117.htm[^]
A cookie is a small text file on the client machine either
in the client''s file system or memory of client browser
session. Cookies are not good for sensitive data. Moreover,
Cookies can be disabled on the browser. Thus, you can''t
rely on cookies for state management.

View State
Each page and each control on the page has View State
property. This property allows automatic retention of page
and controls state between each trip to server. This means
control value is maintained between page postbacks.
Viewstate is implemented using _VIEWSTATE, a hidden form
field which gets created automatically on each page. You
can''t transmit data to other page using view state.


这篇关于客户端状态管理中的viewstate和hiddenfiles和cookie之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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