WebPartMobileAdapter.OnLoad Method
Replaces the OnLoad(EventArgs) method of the control that is being adapted.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Protected Overrides NotOverridable Sub OnLoad ( _
e As EventArgs _
)
'Usage
Dim e As EventArgs
Me.OnLoad(e)
protected override sealed void OnLoad(
EventArgs e
)
Parameters
e
Type: System.EventArgsAn object that contains data for the event.
Remarks
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].