IFieldTemplateFactory.CreateFieldTemplate Method (MetaColumn, DataBoundControlMode, String)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
Available since 3.5
Return to top