SessionPageStatePersister Constructor (Page)
.NET Framework (current version)
Initializes a new instance of the SessionPageStatePersister class.
Assembly: System.Web (in System.Web.dll)
| Exception | Condition |
|---|---|
| ArgumentException | The HttpSessionState is null (Nothing in Visual Basic) |
The following code example demonstrates how you can write a PageAdapter class to return an instance of the SessionPageStatePersister class to save view state to the server-side session object.
Imports System.Web.UI Namespace Samples.AspNet.VB Public Class MyPageAdapter Inherits System.Web.UI.Adapters.PageAdapter Public Overrides Function GetStatePersister() As PageStatePersister Return New SessionPageStatePersister(Page) End Function 'GetStatePersister End Class 'MyPageAdapter End Namespace
.NET Framework
Available since 2.0
Available since 2.0
Show: