Export (0) Print
Expand All

DynamicField.UIHint Property

Gets or sets the field template to use for displaying the data field.

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

public virtual string UIHint { get; set; }

Property Value

Type: System.String
The name of the field template to use for displaying the data field.

Use the UIHint property to specify the field template to use to display the UI for a data field. Field templates by default are user controls and their names contain a suffix to identify field templates that are used for edit operations and insert operations. The suffixes are _edit and _insert, respectively. When you set a value to the UIHint property, you set the name without the suffixes. Dynamic Data will identify the current mode of the data field and will render the correct field template.

If the UIHint property is not set, Dynamic Data by default will render the field template based on the field type. For more information, see ASP.NET Dynamic Data Scaffolding.

The field template that you specify using the UIHint property is specific to this instance of the DynamicField class. You can also change the field template used by a data field across the entire application by applying the UIHintAttribute to your data model. Setting the UIHint property overrides the metadata applied to the data model. For more information about metadata attributes, see ASP.NET Dynamic Data.

The OnFieldChanged method is called to raise a state change event when the UIHint property is set.

The value of the UIHint property is stored in view state.

.NET Framework

Supported in: 4.6, 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.

Show:
© 2014 Microsoft