ComponentOne ToolBar for ASP.NET AJAX: ToolBar Behavior > View State

View State

The C1ToolBar control can automatically save its state for use in-round trips setting its EnableViewState property to true. C1ToolBar’s view state is the accumulation of all its property values. In order to preserve these values across HTTP requests, ASP.NET uses an instance of the StateBag class to store the property values. The values are then passed as a variable to a hidden field when subsequent requests are processed.

There are times when it is appropriate to disable view state, particularly to improve application performance. For example, if you are loading a database request into a server control, set this property to false. If you do not, processor time will be wasted loading view state into the server control that will only be overridden by the database query. If EnableViewState is false, you can use the control state to persist property information that is specific to a control and cannot be turned off like the view state property.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.