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. PageStatePersister屬性主要由控制項開發人員擴充功能的Page類別。The PageStatePersister property is used primarily by control developers extending the functionality of the Page class.