Supporting Control State
The ASP.NET Framework includes a feature named Control State, which is similar to View State. Just like View State, any values that you add to Control State are preserved in the hidden __VIEWSTATE
form field. However, unlike View State, Control State cannot be disabled. Control State is intended to be used only for storing crucial information across postbacks.
Control State was introduced to address a problem that developers encountered in the first version of ASP.NET Framework. You can disable View State for any control by assigning the value False
to a control’s EnableViewState
property. Often, this is a good idea for performance reasons; however, disabling View State also made several controls nonfunctional.
For example, ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.