Page ViewState debugging can be turned on by adding one or more of the following keys into the AppSettings section of your web.config file:
|•||CMSDebugViewState - enables the Page ViewState tab in Administration -> System -> Debug|
|•||CMSDebugViewStateLive - enables ViewState debugging on the live site|
|•||CMSDebugAllViewStates - enables ViewState debugging for all operations (including the UI)|
|•||CMSDebugViewStateLogLength - maximal length of the ViewState debug log (number of preserved records)|
Here is a list of these keys for easy copy&paste into your web.config:
<add key="CMSDebugViewState" value="true" />
<add key="CMSDebugViewStateLive" value="true" />
<add key="CMSDebugAllViewStates" value="true" />
<add key="CMSDebugViewStateLogLength" value="10" />
Page ViewState debugging can also be enabled using the bulk keys.
On the Debug -> Page ViewState tab, you can see the ViewState of particular controls on recently loaded pages. The Is dirty column indicates if the item was added to ViewState after call of the TrackViewState() method (happens typically in OnInit).
The log can be cleared using the Clear ViewState log button.
Please note: ViewState of the controls is retrieved using reflection. Therefore this debug may not work properly under medium trust environment or other specific circumstances.