viewstate and textbox in asp.net
How is a TextBox able to persist changes (e.g. text) even after the EnableViewState
prope开发者_开发百科rty is set to false
in ASP.NET?
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.
精彩评论