Page.OnSaveStateComplete(EventArgs) Page.OnSaveStateComplete(EventArgs) Page.OnSaveStateComplete(EventArgs) Page.OnSaveStateComplete(EventArgs) Method


在頁面狀態已儲存至保存性媒體之後,引發 SaveStateComplete 事件。Raises the SaveStateComplete event after the page state has been saved to the persistence medium.

 virtual void OnSaveStateComplete(EventArgs ^ e);
protected virtual void OnSaveStateComplete (EventArgs e);
abstract member OnSaveStateComplete : EventArgs -> unit
override this.OnSaveStateComplete : EventArgs -> unit
Protected Overridable Sub OnSaveStateComplete (e As EventArgs)


EventArgs EventArgs EventArgs EventArgs

包含事件資料的 EventArgs 物件。A EventArgs object containing the event data.


當控制項的狀態資訊已寫入頁面的持續性媒體時,會呼叫方法。OnSaveStateCompleteThe OnSaveStateComplete method is called when the state information for the control has been written to the persistence medium for the page. 狀態資訊會藉由呼叫SavePageStateToPersistenceMedium方法,寫入持續性媒體中。State information is written to the persistence medium by calling the SavePageStateToPersistenceMedium method.

引發事件會透過委派叫用此事件處理常式。Raising an event invokes the event handler through a delegate. 如需詳細資訊, 請參閱處理和引發事件For more information, see Handling and Raising Events.

OnSaveStateComplete 方法也允許衍生類別處理事件,而不用附加委派。The OnSaveStateComplete method also allows derived classes to handle the event without attaching a delegate. 這是在衍生類別中處理事件的慣用技巧。This is the preferred technique for handling the event in a derived class.


當在衍生類別中覆寫 OnSaveStateComplete(EventArgs) 時,請確定呼叫基底類別的 OnSaveStateComplete(EventArgs) 方法,使已註冊的委派能接收到事件。When overriding OnSaveStateComplete(EventArgs) in a derived class, be sure to call the base class's OnSaveStateComplete(EventArgs) method so that registered delegates receive the event.