The following server controls persist their information across requests even when the control ViewState (the EnableViewState
attribute) is set to False
- The TextBox control.
- The CheckBox control.
- The RadioButton control.
This behavior occurs because the ViewState of a control is only one of the methods that are used to persist a control's attributes across requests. In the server controls that are mentioned in the "Symptoms" section, attributes that are not normally posted to the server through the form-get or the form-post are handled by the ViewState. These values include attributes of the control, such as BackColor
. Attributes that are normally posted to the server are handled by the IPostBackDataHandler
interface. An example of such an attribute is the checked
attribute of the CheckBox
This behavior is by design.