WebPartMobileAdapter.OnLoad method

SharePoint 2013

Replaces the OnLoad(EventArgs) method of the control that is being adapted.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

protected override sealed void OnLoad(
	EventArgs e
)

Parameters

e
Type: System.EventArgs

An object that contains data for the event.

This method does not derive from the OnLoad(EventArgs) method of the control that is being adapted, but it “overrides” it in a broad sense because when there is an adapter for the current browser, the adapter’s OnLoad(EventArgs) method is called, not the control’s. The control’s OnLoad(EventArgs) method, however, is called indirectly by the adapter’s.

If the control is on a mobile Web Part page, this override will call OnLoadForMobile(EventArgs) and then create Web Parts child controls. If the control is not on a WebPartMobilePage, this override simply calls the base adapter class’s [M:System.Web.UI.Adapters.ControlAdapter.OnLoad(System.EventArgs].

Show: