Page.OnLoadComplete(EventArgs) Page.OnLoadComplete(EventArgs) Page.OnLoadComplete(EventArgs) Page.OnLoadComplete(EventArgs) Method


在頁面載入階段結尾,引發 LoadComplete 事件。Raises the LoadComplete event at the end of the page load stage.

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


EventArgs EventArgs EventArgs EventArgs

包含事件資料的 EventArgsAn EventArgs that contains the event data.


OnLoadComplete方法會在頁面載入階段結束時呼叫。The OnLoadComplete method is called at the end of the page load stage. 在頁面生命週期的這個時間點,所有回傳資料和檢視狀態資料都會載入頁面上的控制項。At this point in the page life cycle, all postback data and view-state data is loaded into controls on the page.

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

OnLoadComplete 方法也允許衍生類別處理事件,而不用附加委派。The OnLoadComplete 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.


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