Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
PageAdapter Class
 GetStatePersister Method

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
PageAdapter..::.GetStatePersister Method

Returns an object that is used by the Web page to maintain the control and view states.

Namespace:  System.Web.UI.Adapters
Assembly:  System.Web (in System.Web.dll)
Visual Basic (Declaration)
Public Overridable Function GetStatePersister As PageStatePersister
Visual Basic (Usage)
Dim instance As PageAdapter
Dim returnValue As PageStatePersister

returnValue = instance.GetStatePersister()
C#
public virtual PageStatePersister GetStatePersister()
Visual C++
public:
virtual PageStatePersister^ GetStatePersister()
JScript
public function GetStatePersister() : PageStatePersister

Return Value

Type: System.Web.UI..::.PageStatePersister
An object derived from PageStatePersister that supports creating and extracting the combined control and view states for the Page.

The PageStatePersister property uses the GetStatePersister method to return the object, derived from the PageStatePersister class, that forms and extracts the combined control and view states for the page. If there is no derived page adapter attached to the page, a HiddenFieldPageStatePersister object is used to maintain the state in a hidden field on the page.

Link type

Resulting link

Code Entity Reference,cer

ToString

Code Entity Reference Qualified, cerq

Char..::.ToString

Code Entity Reference Specific,cers

ToString(Char)

Code Entity Reference Qualified Specific, cerqs

Char..::.ToString(Char)

Notes to Implementers:

View state data stored by the PageStatePersister object in the internal ClientState property of the System.Web.UI..::.Page will always be saved in the hidden field on the Web page.

Notes to Inheritors:

When you inherit from the PageAdapter class, you can override the GetStatePersister method to return another derived page state persister if it is not feasible to maintain the combined state in a hidden field (for example, because of limited resources).

The GetStatePersister base class returns a HiddenFieldPageStatePersister object. You can use the SessionPageStatePersister class to maintain the page state in session state.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker