Name
IStateManager
Synopsis
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 ReadOnly Property IsTrackingViewState As Boolean ' Public Instance Methods Public Sub LoadViewState(ByVal state As Object) Public Function SaveViewState() As Object Public Sub TrackViewState() End Interface
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.