<infragistics.web enablePersistence="true" />
The Persistence framework automatically persists all the controls by default. To enable the framework for your application you must set in web.config the attribute enablePersistence to true.
This attribute could also be made false, which would turn off the automatic persistence. Even then, the persistence framework is available for use on individual pages. Using a targeted approach can be ideal when you want to save the state of only a small number of controls. Particularly when you have pages with many controls, restricting the number of persisted controls can improve the responsiveness of the page.
Also, when you disable automatic persistence, Persistence events do not fire. For this reason you need to manually load and save the persisted data. The best way is to do so is to use the InitComplete event of the Page object for loading persisted data and to use PreRenderComplete to save.
To save the required controls, you need an instance of the Persistence Framework class, PersistenceManager . This class is implemented as a singleton; therefore you are ensured to have only one instance working at any time.
The Persistence manager allows for manual loading and saving of data for the controls. Listing 1 demonstrates the persistence of three controls and then shows the retrieving of their state.
Listing 1: Persisting controls to the Persistence Manager