Export (0) Print
Expand All

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)

protected override sealed void OnPreRender(
	EventArgs e
)

Parameters

e
Type: System.EventArgs

An object that contains data for the event.

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.

Community Additions

Show:
© 2014 Microsoft