Export (0) Print
Expand All

IFieldTemplateFactory.CreateFieldTemplate Method

Creates an instance of a field template using the MetaColumn class, the DataBoundControlMode class and UIHint property.

Namespace:  System.Web.DynamicData
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)

IFieldTemplate CreateFieldTemplate(
	MetaColumn column,
	DataBoundControlMode mode,
	string uiHint


Type: System.Web.DynamicData.MetaColumn

Specifies the data column to use to display the field template.

Type: System.Web.UI.WebControls.DataBoundControlMode

Specifies the display mode of the field template.

Type: System.String

Specifies the field template to use.

Return Value

Type: System.Web.DynamicData.IFieldTemplate
An instance of a [FieldTemplateFactory] object when implemented in a class.

ASP.NET Dynamic Data field templates are ASP.NET user controls that map data controls to data types in a data model. Field templates generally derive from FieldTemplateUserControl, the class that enables access to data fields, data columns, and metadata in data models. Dynamic Data projects provide default field templates, but you can modify them or create custom field templates. When imlemented, this method creates a field template based on the data column, the mode of the data column, and the UIHint property. You specify the uiHint parameter if you want to render data using a custom field template.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft