This interface provides methods that are used to manage view state,
which is the set of information that describes a
control's current state. View state is stored in a
hidden field on a Web Forms page, so it can be maintained across
postbacks. State management is built into the
Control class, and you can write values into the
Control.ViewState collection to store any
information you need without using IStateManager.
However, you can also create a custom control that implements this
interface to customize how state management works. The
IStateManager consists of three methods:
SaveViewState( ), which stores changes to an
object, LoadViewState( ), which retrieves and
applies previously stored values, and TrackViewState(
), which sets the IsTrackingViewState
property to True and instructs ASP.NET to track
changes to the control's view state.
public interface IStateManager {
// Public Instance Properties
public bool IsTrackingViewState{get; }
// Public Instance Methods
public void LoadViewState(object state);
public object SaveViewState( );
public void TrackViewState( );
}