文本框属性EnableViewState问题 [英] textbox property EnableViewState problem

查看:91
本文介绍了文本框属性EnableViewState问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我有一个asp.net形式的文本框.
我将EnableViewState属性设置为false,但在回发后,我的文本框仍保留输入的文本?为什么在回发后,我的文本框仍保持值?

hi to all
i have a textbox in a asp.net form.
i set EnableViewState property to false but after postback my text box still hold my entered text?why my text box hold value after postback ?

推荐答案

来自richcb的链接

文本框不使用ViewState在回发之间维护/保持其值.值在HTTP Post标头中维护.

这就是为什么文本框在回发后保留文本的原因. "
From richcb''s link

"Textboxes do not use ViewState to maintain/hold their values between postbacks. Values are maintained in HTTP Post headers.

Thats the reason why the textbox holds the text after the postback. "


这篇关于文本框属性EnableViewState问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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