PRB: Server controls persist their state when EnableViewState is set to False (316813)
The information in this article applies to:
- Microsoft ASP.NET (included with the .NET Framework 1.1)
- Microsoft ASP.NET (included with the .NET Framework) 1.0
This article was previously published under Q316813 SYMPTOMS
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.
CAUSE
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 control.
STATUSThis behavior is by design.
Modification Type: | Minor | Last Reviewed: | 5/3/2004 |
---|
Keywords: | kbprb kbServerControls kbState kbWebForms KB316813 |
---|
|