Export (0) Print
Expand All

ControlAdapter::SaveAdapterViewState Method

Saves view state information for the control adapter.

Namespace:  System.Web.UI.Adapters
Assembly:  System.Web (in System.Web.dll)

protected public:
virtual Object^ SaveAdapterViewState()

Return Value

Type: System::Object
An Object that contains the adapter view state information as a StateBag.

When an adapter needs to maintain its own view state information, it can override the SaveAdapterViewState and LoadAdapterViewState methods.

An adapter needs to maintain view state information when there is data that must be maintained across requests, independent from the associated view state of the control. For example, a grid control on desktop computer browsers might render as a single view of rows and columns of values. On other browsers, it might split its rendering into multiple separate views, such as a list of rows and details of a single row. The adapter would need to maintain the data for the views that are not currently active in view state.

The SaveAdapterViewState method is called immediately before the Control::SaveViewState method in the SaveState lifecycle stage. The adapter view state is separate and in addition to the view state of the control.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft