Compartir a través de


: SPMobileBaseFieldControl.CreateControlForNew (Método) (Microsoft.SharePoint.MobileControls)

Creates a control for rendering the field on a New item form.

Espacio de nombres:
Ensamblado: Microsoft.SharePoint (in microsoft.sharepoint.dll)

Sintaxis

'Declaración
Protected Overridable Function CreateControlForNew As MobileControl
'Uso
Dim returnValue As MobileControl

returnValue = Me.CreateControlForNew
protected virtual MobileControl CreateControlForNew ()

Valor devuelto

A MobileControl that renders the field on a New form.

Comentarios

The default implementation calls CreateControlForDisplay.

Ejemplo

The following example shows an override of this method that inserts default text in the item title on a New item form. For the full example, see Tutorial: creación de un control de representación de campos personalizado para páginas móviles.

C#

protected override MobileControl CreateControlForNew()

{

MobileControl myNewControl = null;

if (this.Field != null)

{

string text = "Group: Project Name";

if (!this.Page.IsPostBack)

{

this.TextBoxControl.Text = text;

}

myNewControl = this.TextBoxControl;

}

return myNewControl;

}

Vea también

Referencia

SPMobileBaseFieldControl (Clase)
SPMobileBaseFieldControl (Miembros)
Microsoft.SharePoint.MobileControls (Espacio de nombres)