Hi Antonius,
1) This is for legacy reasons. EnableViewState has been in the framework forever. When ViewStateMode was implemented, the designers of ASP.NET couldn't modify the behavior of EnableViewState as that would have broken millions of sites. That's why they introduced the new property to give you more control.
2) The properties are implemented on the base Control so all controls inherit them. TextBox *can* use View State; it just doesn't need it to keep track of the value the user supplies when posting back. If you set up, say, a TextChanged event handler, ViewState is used to store the old value so ASP.NET can compare the old and new value on the server and raise the event when the data is different.
Hope this helps,
Imar
|