AspAlliance.com LogoASPAlliance: Articles, reviews, and samples for .NET Developers
URL:
http://aspalliance.com/articleViewer.aspx?aId=1659&pId=-1
ASP.NET Dynamic Data Preview Available
page
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 22096/ 35

Introduction

Republished with Permission - Original Article

A few months ago we released an ASP.NET 3.5 Extensions Preview that contained a bunch of new features that will be shipping later this year (including ASP.NET AJAX Improvements, ASP.NET MVC, ASP.NET Silverlight Support, and ASP.NET Dynamic Data).

The ASP.NET Dynamic Data support within that preview provided a first look at a cool new feature that enables you to quickly build data driven web-sites that work against a LINQ to SQL or LINQ to Entities object model.  ASP.NET Dynamic Data allows you to automatically render fully functional data entry and reporting pages that are dynamically constructed from your ORM data model meta-data.  In addition to supporting a dynamic rendering mode, it also allows you to optionally override and customize any of the view templates using any HTML or code you want (given you full control of the experience).

ASP.NET Dynamic Data Preview

Today we released an updated ASP.NET Dynamic Data Preview.  You can learn more about it and download it here.

This new dynamic data preview now works with the standard built-in ASP.NET data controls (GridView, ListView, FormView, DetailsView, etc).  The dynamic data support enables these controls to automatically handle foreign-key relationships.  For example, on a GridView you'll now get automatic friendly name display of foreign key column values and automatic drop-down list selection support of these values when in edit mode:

Figure 1

The new dynamic data support also provides automatic UI validation support (both client-side and server-side) based on the constraints you set on your data model classes.  For example, if a column in the database is limited to 50 characters in size, and is marked as non-nullable, appropriate UI control validators will automatically be applied by ASP.NET dynamic data to enforce this constraint in the UI pages as well.  If you change the constraints within your LINQ to SQL or LINQ to Entities data model classes, the UI will automatically pick up these changes and enforce the new constraints on the next web request.

In addition to standard data model metadata, you can also declare custom metadata to further control validation and the default display of UI of objects. 

You will be able to use all of the above features with both LINQ to SQL and LINQ to Entities.

Visual Studio Dynamic Data Project Wizard

In addition to the core ASP.NET dynamic data runtime support, the VS web tools team today also shipped a first preview of a new dynamic data project wizard that enables you to quickly get a data driven web-site started.  The wizard allows you to select a database, and then the tables, views and sprocs within it that you want to build a LINQ to SQL data model around:

Figure 2

After creating a data model, the wizard allows you to easily choose dynamic data driven template pages to build UI around it:

Figure 3

You can then choose what type of inserting/editing/updating UI is supported on each page:

Figure 4

And when you click finish it will setup a project with your data model classes and data UI pages setup to run.  You can learn more about the wizard and watch it in action in a blog post and screencast here.

How to Get Started

You can learn more about this new dynamic data preview and download and run it locally here.

You can watch David Ebbo's dynamic data presentation at MIX 08 to learn more about how it works.  Also check out Scott Hunter's screen-cast here, and Brad Millington's screen cast here.  David also has a post here that talks about the changes made between the December preview and today's preview release.

You can ask questions and submit feedback via the www.asp.net forums here.

Hope this helps,

Scott

Resources

Product Spotlight
Product Spotlight 

©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-03-29 8:00:05 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search