Page.PageStatePersister Page.PageStatePersister Page.PageStatePersister Page.PageStatePersister Property


取得與網頁關聯的 PageStatePersister 物件。Gets the PageStatePersister object associated with the page.

 virtual property System::Web::UI::PageStatePersister ^ PageStatePersister { System::Web::UI::PageStatePersister ^ get(); };
protected virtual System.Web.UI.PageStatePersister PageStatePersister { get; }
member this.PageStatePersister : System.Web.UI.PageStatePersister
Protected Overridable ReadOnly Property PageStatePersister As PageStatePersister



HTTP 要求和回應原本就是無狀態。HTTP requests and responses are inherently stateless. 為了維護 HTTP 要求之間的狀態,ASP.NET 伺服器頁面可以Page儲存狀態。To maintain state between HTTP requests, ASP.NET server pages can store Page state. 此狀態稱為「檢視狀態」,包含頁面和控制項設定和資料,讓頁面和控制項看起來就像是使用者在最後一次往返頁面時所看到並互動的相同。This state, called view state, consists of page and control settings and data that make the page and controls appear as if they are the same ones that the user saw and interacted with on their last round trip to the page. 有數個機制可在相同頁面的連續要求之間儲存檢視狀態。Several mechanisms exist to store view state between successive requests to the same page. 抽象PageStatePersister類代表這些狀態儲存機制的基類。The abstract PageStatePersister class represents the base class for these state storage mechanisms.

網頁開發人員通常不需要使用PageStatePersister屬性。Page developers will typically not need to use the PageStatePersister property. 屬性主要由控制項開發人員擴充Page類別的功能所使用。 PageStatePersisterThe PageStatePersister property is used primarily by control developers extending the functionality of the Page class.