ASP.NET Dynamic Data Preview Available

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:

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:

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

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

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

35 Comments

  • Hi Scott,

    Sorry to be slightly off topic, but do/will the MS ORM type platforms (Linq to Sql, Entity Framework etc) support a more MDA type approach where I could (as an example) create my domain classes using the class designer in Visual Studio and then generate DDL from them to build a database schema?

  • Really looking forward to getting my hands on this stuff.

  • Great stuff, Scott. Brad Abrams demo'd this at TriNUG last night, and it got a very good reception.

  • This is fantastic! Soon enough VS will do 'debug while you write' :)

  • http://blogcastrepository.com/blogs/wisemx/archive/2008/04/10/asp-net-dynamic-data-preview.aspx

  • Does this guy ever sleep ? I think is true that he's actually 3 in 1, while one clone sleeps the other 2 work.
    Congratulations on the outstanding work.

  • Hi Scott,

    Dynamic website stuff is pretty good but there should be some way to add this dynamic support in an existing project which is NOT a dynamic website project.

    Also, there should be some support for searching in a table available through the interface.

  • Does this work with Oracle? If not, is there an ETA for Oracle support?

    In past versions of data providers Microsoft has typically provided Oracle support out of the box. It is unfortunate that is not the case for LINQ and ASP.NET Dynamic Data.

  • how does this compare with subsonic?

  • Very cool - the videos are very good too - this could be very handy indeed.

  • I have been working with Dynamic Data for over a month and am very excited about it. I wanted promote an aspect of Dynamic Data that will be used in many other situations than the application Scott showed.

    Dynamic Data introduces a new web control called DynamicControl. It can be used in FormView and ListView controls to provide a UI based on database-level schema. When using GridView and DetailsView, you add a DynamicField, which is a replacement for the BoundField that internally has a DynamicControl. (Thus has all of the features of a DynamicControl.)

    This results in your Grids and data entry forms being built around tables and columns of your database with whatever smart data entry controls you like, such as the AJAX Control Toolkit's MaskedTextBoxExtender on a textbox or your favorite third party controls. The database schema also determines the validators for this column. That avoids errors implementing the right validators or updating them when the database schema is modified. (No more "how do I validate a BoundField?" issues!)

    To me, Dynamic Data is a major step forward in developing data entry oriented web applications for ASP.NET.

  • Wow, that's all I can say!
    Thanks Scott and the teams at Microsoft too.

  • Wow, this looks great. Guess we've been picking a good time to start doing all of our new enterprise applications in .net 3.5, get access to all the good stuff!

  • I'm excited by the possibilities of quickly building data driven web-sites that work against a LINQ to SQL or LINQ to Entities object model. However, we are undergoing a review and an ultimate audit by Trustwave in order to achieve mandatory Visa Payment Card Industry (PCI) compliance, and we're being told that no data access is allowed on a web server app. All data access must be done from an application server layer remote from the web server application. So, ASP.NET web pplications using LINQ (or any database access) is not secure enough to achieve PCI compliance? Help!

  • Cool work scott, I was wondering if this is the answer to Sybase Datawindow.net? i was always wondering if Microsoft can do it in MS Access why can't we do it in Visual studio, good work sir!!

  • I like the reusable template approach of Dynamic Data a lot. It would be fantastic if it could be used as UI/Logic/Constraint Layer and linked up with other DAL-Providers like SubSonic for actually handling the CRUD. It probably all boils down to wether SubSonic will support a LINQ to SubSonic adapter (which I think it will at some point).

  • Hi Chris,

    >>>>>> Sorry to be slightly off topic, but do/will the MS ORM type platforms (Linq to Sql, Entity Framework etc) support a more MDA type approach where I could (as an example) create my domain classes using the class designer in Visual Studio and then generate DDL from them to build a database schema?

    You can actually do this today with the LINQ to SQL designer (and I believe LINQ to Entities). Basically you can drag/drop class objects from the toolbox and wireup their relationships and properties. This will then generate the data model without having to access a database. You can then call the "CreateDatabase()" method on the generated DataContext to generate the .SQL file or directly create the tables and objects in the database.

    I do think there are several things the designer could do to make this easier (I'd love the ability to right click and just get the .SQL file directly from the designer). But I think you might find that the basics are there enough for you to make progress with it.

    Hope this helps,

    Scott

  • Hi Azam,

    >>>>>> Dynamic website stuff is pretty good but there should be some way to add this dynamic support in an existing project which is NOT a dynamic website project.

    If you add the template files and the web.config registration settings, you can add dynamic data to an existing project.

    Hope this helps,

    Scott

  • Hi Matt,

    >>>>>>> Does this work with Oracle? If not, is there an ETA for Oracle support? In past versions of data providers Microsoft has typically provided Oracle support out of the box. It is unfortunate that is not the case for LINQ and ASP.NET Dynamic Data.

    Our plan is to support Oracle with LINQ to Entities (which will ship with SP1). You should then be able to use ASP.NET Dynamic Data with a LINQ to Entities object model.

    Hope this helps,

    Scott

  • Hi Randy,

    >>>>>>>> I'm excited by the possibilities of quickly building data driven web-sites that work against a LINQ to SQL or LINQ to Entities object model. However, we are undergoing a review and an ultimate audit by Trustwave in order to achieve mandatory Visa Payment Card Industry (PCI) compliance, and we're being told that no data access is allowed on a web server app. All data access must be done from an application server layer remote from the web server application. So, ASP.NET web pplications using LINQ (or any database access) is not secure enough to achieve PCI compliance? Help!

    Two things to check:

    1) Can you put a forward proxy like ISA server into the layout and be compliant (since that avoids the clients from ever directly hitting the web server). This would be an easy way to ensure that your ASP.NET code ran behind a firewall and wouldn't require any code changes.

    2) Alternatively change your code to call a web-service to perform all data querying. This unfortunately would require some code-changes - and I don't think the asp.net dynamic data support would directly work with it.

    Sorry!

    Scott

  • I tried to DownLoad the Zip files after cliking the release tab , But Note pad
    files are copied to my Dowloads Folder
    not the real zip files why ?
    I didnot know .
    Help .. what to Do ?
    Thanks

  • Hi Scott,

    You are up to date everyday. I do like ASP.NET Dynamic Data, and Could you have another post about it Performance compare with LINQ and simple store procedure?

  • Hi watched the webcast and was impressed. I did however notice that although a property had been renamed via an attribute, the validation message still referred to the underlying property name. This would be confusing to the end user. Can we customise the validation message behaviour at all?

  • I've been building database driven websites for 12 years now and I am SOOO happy that coding will take much much MUCH less time now! Can’t wait to see have far this goes!

  • Hi There :)

    I think this is definitely the best part of the MVC Framework. In the final release, would it be possible for you to include .asmx files that contains all the Ajax controls? David Ebbo in his video cast created his own controls but it worked so well with the Dynamic Data that you guys have to have them included!

    Thanks and all the best with this.

  • Hello, I can help you, I am still working with ASP.NET 2.0, but what we need is news show, which controls could use?

  • When will Dynamic Data for MVC be available and how will it work?

  • Scott,

    I just got finished trying to debug a problem that has been taking three days to solve. It turns out that the Dynamic Data CTP I downloaded and installed was the culprit. I was getting a very cryptic error message - "Length cannot be less than zero. Parameter name: length" - anytime i tried to build a web project from VS 2008 Team Suite. Any existing site wouldn't build and any new site I created would not build.

  • Scott,
    The ability to plug-in non-LINQ ORM is very important for our project (huge SubSonic-based BLL/DAL serving multiple sites with ~4.5K test cases; often changed UI for the sites).

    Question: are there any plans to allow the use of DD controls with other (non-LINQ) providers. Especially, SubSonic.

    Great job!
    Thanks,
    - ms440

  • Hi Scott,

    You mentioned "standard data model metadata". I was wondering what that includes and who sets the standard. I mean, are you using the term 'standard' loosely to refer to what you think a typical user would expect to be present, or are you referring to a specific written standard established by someone?

  • Great stuff. One question though. What about security? It would be great if you could assign roles / permissions to the elements/actions through the wizard.

  • i need some help regarding gridview,i want to add hyperlink in gridview

  • What's the timeline on the ASP.NET Dynamic Data framework? When can we expect it to enter its first beta? When can we expect it to go gold?

    Thanks,
    JB

  • "You can actually do this today with the LINQ to SQL designer (and I believe LINQ to Entities). Basically you can drag/drop class objects from the toolbox and wireup their relationships and properties. This will then generate the data model without having to access a database. You can then call the "CreateDatabase()" method on the generated DataContext to generate the .SQL file or directly create the tables and objects in the database."

    That is a great feature that I was looking for. I tried it out, but it seems the signature of CreateDatabase is void CreateDatabase() - so it can create the db, but I couldn't find a method to get the .SQL file from the dbml. Have I missed something? Thanks.

  • LINQ's where condition can be configured with the following ways, but, often they return objects and LINQ can't handle objects.... is there a way to tell LINQ how to deal with the objects?

    None
    Parameter

    Control
    ControlParameter

    Cookie
    CookieParameter

    Form
    FormParameter

    Field
    ProfileParameter

    QueryString
    QueryStringParameter

    Session
    SessionParameter

Comments have been disabled for this content.