DataPagerField.ViewState 屬性

定義

取得狀態資訊的字典,可讓您在相同頁面的多個要求之間儲存和還原 DataPagerField 物件的檢視狀態。Gets a dictionary of state information that enables you to save and restore the view state of a DataPagerField object across multiple requests for the same page.

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

屬性值

包含 DataPagerField 檢視狀態資訊的物件。An object that contains the DataPagerField view-state information.

備註

資料頁呼機欄位的檢視狀態是其所有屬性值的累積。A data pager field's view state is the accumulation of all its property values. 若要跨相同頁面的 HTTP 要求保留值, ASP.NET 伺服器控制項會使用此屬性來儲存屬性值。To preserve values across HTTP requests for the same page, ASP.NET server controls use this property to store the property values. 這些值會儲存在頁面上的 HTML 隱藏 input 元素中。The values are stored in an HTML hidden input element on the page. 如需詳細資訊, 請參閱ASP.NET View State 總覽For more information, see ASP.NET View State Overview.

根據預設, 會針對所有伺服器控制項啟用檢視狀態, 但在某些情況下, 您可能會想要停用它。By default, view state is enabled for all server controls, but there are circumstances when you might want to disable it. 如需詳細資訊, 請參閱ASP.NET 效能總覽For more information, see ASP.NET Performance Overview.

如需有關字典及其使用方式的詳細資訊, 請參閱集合和資料結構For more information about dictionaries and how to use them, see Collections and Data Structures.

適用於

另請參閱