Share via


WebPartMobileAdapter.OnInitForMobile method

Replaces the OnInit(EventArgs) method of the control that is being adapted when the control is on a WebPartMobilePage.

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

Syntax

'Declaration
Protected Overridable Sub OnInitForMobile ( _
    e As EventArgs _
)
'Usage
Dim e As EventArgs

Me.OnInitForMobile(e)
protected virtual void OnInitForMobile(
    EventArgs e
)

Parameters

Remarks

The default implementation only calls the base OnInit(EventArgs) method.

Do not call this method from your own code. The Microsoft SharePoint Foundation mobile adaption framework will call it as part of the Init event handling.

Notes to inheritors

Override this method when you need additional initialization logic to render the control on a mobile device.

Important

Your override must always call the base adapter class’s OnInit(EventArgs) method to ensure that the Init event of the control that is being adapted is raised.

See also

Reference

WebPartMobileAdapter class

WebPartMobileAdapter members

Microsoft.SharePoint.WebPartPages namespace