Making a "Private" Use of the "Public" ViewState
Very few built-in server controls make a private use of the view state; and most often this is limited to particular features. A private use of the view state is when a control stores the content of non-public properties in the view state. By storing its internal properties to the view state, the control is using the view state privately. There's no way for parent controls and for the page to access this info. That's OK because that info is private to the control itself.
Making private use of the public viewstate is and remains a perfectly legal practice. However, it becomes a dangerous one when the view state is disabled at the page level. Like it or not, if the viewstate is disabled altogether there's not much a control can do.
Purposedly, ASP.NET 2.0 introduces a new type of state for controls--the control state. This is one of my favorite new features of ASP.NET--though one too specific for being mentioned in the highlights of the technology. In ASP.NET 2.0, the control state is safer to use than the view state because none of the application or page level settings can ever affect it. If your custom control has private or protected properties stored in the view state, you should move all of them to the control state in ASP.NET 2.0. Everything you store in the control state remains there until explicitly removed. The control state is persisted to a new hidden field named __CONTROLSTATE. This means that the more data you pack into in it, the more data is moved back and forth between the browser and the Web server. Unlike the view state, though, there’s no way to control the size of the control state. You should be using control state in ASP.NET 2.0; but be very very careful about it.
The implementation is left to the control developer. In other words, there's no predefined hashtable like ViewState where you add to. At least, this is not the case in the alpha. The idea is that you maintain your state in the variables that best suit you, much like what you would do in a stateful WinForms app. Then, by overriding the new SaveControlState method you pack any critical data into an array or a hashtable and return it to the system for further binary serialization and Base64 encoding. It is important for SaveControlState to return a serializable structure.
Hidden fields are more and more at the core of ASP.NET programming :-)
On the other hand, how could it be otherwise as long as HTTP is the underlying transportation?