文本框(隐藏)和视图状态 [英] Textbox (hidden) and viewstate

查看:109
本文介绍了文本框(隐藏)和视图状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我想知道我可以使用文本框(将被隐藏)来维护回发之间的值而不是viewstate作为viewstate降低性能,以便让我知道哪种性能会更好。

- viewstate或textbox(将被隐藏)。



plz plz回复



提前付款。

Satish Hirpara。

解决方案

实际上,viewstate属性默认以Base 64格式存储数据。但文本框会将文本存储为纯文本。如果您将值存储在隐藏的文本字段中,则很容易入侵。有时它取决于您的要求。为了更好的建议,我们需要你将如何使用。



酷,简单......它的观点。


那里也是一个隐藏字段的概念,所以不需要使用隐藏文本框。你也可以使用session.It不会在你的页面上加载。



您可以在下面的链接上找到关于会话的非常简短的信息性文章



在ASP.NET中探索会话 [ ^ ]


您可以使用隐藏字段或视图状态在客户端作为基础同一存储64并且不安全。

如果你想要它是安全的,那么存储为会话变量。

由于会话是管理服务器端,所以你的服务器负载很小。

Hello ,

I want to know that can i use textbox(which will be hidden) to maintain the value between postbacks instead of viewstate as viewstate reduses performance so plz let me know which will be better for performance.
- viewstate or textbox(which will be hidden).

plz plz reply

Thanx in advance .
Satish Hirpara.

解决方案

Actually the viewstate property store the data in Base 64 format in by default. but the textbox will store the text as plain text. Its easy to hack if you u store the value in the hidden textfield. Some times its depends on your requirement. For better suggestion we need how you are going to use.

Cool , Be simple ...its viewstate.


There is a concept of hiddenfield also,so theres no need to use hidden textbox.You can also make use of session.It wont make load on your page.

You can have very brief and informational article regarding sessions on below link

Exploring Session in ASP.NET[^]


You can use hidden filed or view state both are same store on client side as base 64 and not secure.
If you want it secure then store as session variable.
It is make little load on you server as session is manage server side.


这篇关于文本框(隐藏)和视图状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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