Summary
A field template is a special type of ASP.NET user control that inherits from the FieldTemplateUserControl base class provided by Dynamic Data. Multiple columns can reuse the same field template based on its compatibility with the column type and control mode. Changing a single field template automatically affects the user interface generated for all matching columns in the data model. Dynamic Data project template comes with a reasonable number of field templates that allow developers to create working web applications for many data types out of the box. Developers can easily modify the default field templates as well as add new ones to meet specific requirements of their projects.
Dynamic Data supports separate templates for Read-only, Edit, and Insert modes. Although a single template can support all three modes and programmatically display different versions of child controls, separating this logic into different templates helps to keep them simple and lightweight. Dynamic Data uses common-sense logic to find the best matching field template based on the column type and required control mode. If the most specific template does not exist, Dynamic Data gradually relaxes the matching rules and tries to find templates for a more generic column type and control mode.