How is a TextBox able to persist changes (e.g. text) even after the EnableViewState
property is set to false
in ASP.NET?
在ASP.NET中,即使EnableViewState属性设置为false,文本框如何能够持久化更改(例如文本)?
1 个解决方案
#1
3
Because the ASP.NET Textbox control generates an HTML form input element <input type="text" name="x" />
. You can verify this by looking at the source view from your browser on an ASP.NET page. When the form is posted, ASP.NET is able to read the text value from the HTTP POST contents. You can read more about it here and here.
因为ASP。NET Textbox控件生成一个HTML表单输入元素。您可以通过在ASP上查看浏览器的源视图来验证这一点。网络页面。当表单被发布时,是ASP。NET可以从HTTP POST内容中读取文本值。你可以在这里和这里读到更多。
#1
3
Because the ASP.NET Textbox control generates an HTML form input element <input type="text" name="x" />
. You can verify this by looking at the source view from your browser on an ASP.NET page. When the form is posted, ASP.NET is able to read the text value from the HTTP POST contents. You can read more about it here and here.
因为ASP。NET Textbox控件生成一个HTML表单输入元素。您可以通过在ASP上查看浏览器的源视图来验证这一点。网络页面。当表单被发布时,是ASP。NET可以从HTTP POST内容中读取文本值。你可以在这里和这里读到更多。