Redigera

Dela via


DynamicField.UIHint Property

Definition

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

public:
 virtual property System::String ^ UIHint { System::String ^ get(); void set(System::String ^ value); };
public virtual string UIHint { get; set; }
member this.UIHint : string with get, set
Public Overridable Property UIHint As String

Property Value

The name of the field template to use for displaying the data field.

Remarks

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.

Applies to

See also