WebPartMobileAdapter.OnPreRender method
Replaces the OnPreRender(EventArgs) method of the control that is being adapted.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Protected Overrides NotOverridable Sub OnPreRender ( _
e As EventArgs _
)
'Usage
Dim e As EventArgs
Me.OnPreRender(e)
protected override sealed void OnPreRender(
EventArgs e
)
Parameters
e
Type: System.EventArgsAn object that contains data for the event.
Remarks
This method does not derive from the OnPreRender(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 OnPreRender(EventArgs) method is called, not the control’s. The control’s OnPreRender(EventArgs) method, however, is called indirectly by the adapter’s.
This override calls the OnPreRenderForMobile(EventArgs) method if the control is on a WebPartMobilePage; otherwise, it calls the base OnPreRender(EventArgs) method. Ultimately, after each layer of adapter class has done its initialization and called its parent’s OnPreRender(EventArgs) method, the OnPreRender(EventArgs) method of the control that is being adapted is called.