Ratnakar’s Weblog

Dynamic Data Preview for ASP.Net now available for download!!!

Posted in ASP.Net, C#, Dynamic Data, General I.T by Ratnakar Garikipati on April 10, 2008

ASP.NET Dynamic Data is a powerful new feature that provides two significant usability improvements to working with data controls in ASP.NET Web sites and Web applications.

The first improvement is for existing applications that use DetailsView, FormView, GridView, or ListView controls. The DetailsView and GridView controls have been extended to display fields by using templates instead of by using hard-coded rules that are programmed in the controls. These templates are part of the project, and you can customize them to change their appearance or to specify what controls they use for rendering. This makes it very easy to make a change in one place that specifies how to present dates for editing, as one example. FormView and ListView controls can implement similar behavior by using a DynamicControl control in their templates and by specifying which field in the row to display. Dynamic Data will then automatically build the UI for these controls based on the templates that you specify.

The second improvement is that the controls look at the metadata for a LINQ to SQL or Entity Framework data model and provide automatic validation based on the model. For example, if a column in the database is limited to 50 characters, and if a column is marked as not nullable, a RequiredFieldValidator control is automatically enabled for the column. (The controls also automatically support data-model-level validation.) You can apply other metadata to take further control over display and validation.

You can find more details here – http://code.msdn.microsoft.com/dynamicdata, and Scott Gu has a good post with an example here (http://weblogs.asp.net/scottgu/archive/2008/04/10/asp-net-dynamic-data-preview-available.aspx) plus links to other useful posts about this topic.

Add to Tecnorati Favorites