DataSource Query Extender in Dynamic Data Preview 4
One of the new big features in ASP.NET 4 is the QueryExtender control. This control allows very simple filtering for data source controls for common operations that developers want to do like search for a string across columns, check if the value of a column is in a certain range and other operations. These samples also show the DomainDataSource which is a new ASP.NET data source control that will be used to access .NET RIA Service Domain Services. See the .NET RIA Service section at the bottom of the document for how to download and install the tooling support for Domain Services.
· DomainDataSource
· Basic. This show typical ASP.NET data binding using the DomainServiceDataSource.
· With QueryBlock. This demonstrates all the new filters that are possibly with the QueryExtender which include search, range, control and custom.
· Validation and Authentication. This demonstrates support for validation and user authentication in Domain Services and that the DomainDataSource supports these scenarios.
· LinqDataSource
ADO.NET DataServices
This project contains a sample DataServiceLinqDataSource which is an ASP.NET data source for accessing ADO.NET Data Services from web pages.
· Microsoft.Data.Services.WebControls. This project contains a standalone ASP.NET datasource that can be used to access ADO.NET Data Services. It also contains a data model provider for using ADO.NET Data Services from Dynamic Data.
· DataServiceClient. This is a Dynamic Data application that scaffolds an ADO.NET Data Service.
DataServiceServer. This is a sample ADO.NET Data Service used as the server for the DataServiceClient sample.
Dynamic Data Futures
This project contains some samples of features and techniques that will not be shipping in .NET 4 but may show up in future releases of Dynamic Data.
· Set Metadata at Runtime. Normally metadata that Dynamic Data consumes is created at compile time using attributes. This sample shows how to add metadata to a data model at runtime.
· Image FieldTemplates. This field template sample shows how to take columns in the database that contain binary images and allow them to be displayed and edited using the DbImage field template. It also supports columns that contain URL’s to images via the FileImage field template. Both of these can be applied to columns using the UIHint attribute.
· Pretty URL’s. This demonstrates how to build routes that contain one or more primary keys and format them into a pretty urls. For example: /Categories/Details?CategoryID=3 to show as /Categories/Details/3
· Project Templates
These are starter projects that can be used to build brand new applications that have support for all the new features in the Preview. To start just copy the directory that supports the data model that you are using to a working folder, create the data model and register it in Global.asax.
· DomainServiceProject. This is for projects using the .NET RIA Domain Service for the data access layer. See the section below on .NET RIA Services for information on how to get tooling support for creating data access layers.
· EntityFrameworkProject. This is for projects using Entity Framework models for the data access layer.
· LinqToSqlProject. This is for projects using Linq to SQL for the data access layer.
Posted in: C# and .NET| Tags: CTP Dynamic Data DataSource Query Query Extender DataServices FeatureSeveral New Features in Dynamic Data Preview 4
· Entity Templates
· Filters
· Support for inheritance in Entity Framework and Linq to SQL
· Support for many to many in Entity Framework
· Email and Url field templates
· Support for many new data annotation attributes
· Display
· Order – control order of fields
· AutoGenerateFilter - control if a field is used as a filter
· FilterUIHint – override default filter used for a field
· Ability to provide default values for fields at runtime
· Ability to use field templates and validation in Web pages hosted by any ASP.NET application.
· Requires no data model
· Requires no routing
· Datasource for accessing .NET RIA Domain Service and Dynamic Data support for .NET RIA Domain Service
DynamicDataSamples
This is the primary project sample that shows most of the new functionality that has been added to Dynamic Data since .NET 3.5 SP1. The default.aspx page highlights many of the new items that are being added in .NET 4, in particular:
· Filter Templates. Filters are now first class citizens in Dynamic Data. There is a new FilterTemplate directory that contains the default filter templates and supports user defined filter templates. Filters can be applied to columns using the new FilterUIHint attribute.
· Entity Templates – The Details, Edit and Insert page templates in version 1.0 forced a two column display style (field name, field value). Entity templates allow for the layout of an entity to be arbitrarily customized.
· Field Templates. The following new field templates have been created.
· Email Field Template. Data fields in the model that are marked with DataType(DataType.Email) will be displayed as mailto: hyperlinks that will launch the email client when clicked.
· Url Field Template. Fields in the model that are marked with DataType(DataType.Url) will be displayed as hyperlinks that will open a new window with the given URL.
· Many to Many Relationships in Tables. Entity Framework models support many to many relationships. Dynamic Data will display these as a list of values or in edit mode a list of checkboxes for the selectable columns.
· Enumeration on Model. If a column in the model is associated with an enumeration data type it will be displayed as a dropdown list of the values from the enumeration.
· Enumeration using Metadata. If a column in the model has an EnumDataType(typeof(enum)) attribute it associated with an enumeration data type it will be displayed as a dropdown list of the values from the enumeration.
· Inheritance. Both Entity Framework and Linq to SQL support inheritance relationships in their data models. Dynamic Data will now properly display this data.
This sample also shows some other advanced features in Dynamic Data such as
· Multiple Data Models
· Each data model uses a different data model technology.
· Each registers its own custom DynamicData directory.
Posted in: C# and .NET| Tags: NET CTP .NET 4.0 New Dynamic Data Control field data framework entity support filter order dynamicWhat is new in asp.net 4.0
The following sections describe new features in ASP.NET core services, Web Forms, Dynamic Data, and Visual Web Developer.
ASP.NET Core Services
ASP.NET introduces several features that improve core ASP.NET services, Web Forms, Dynamic Data, and Visual Web Developer. For more information, see What’s New in ASP.NET and Web Development.
ASP.NET Web Forms
Web Forms has been a core feature in ASP.NET since the release of ASP.NET 1.0. Many enhancements have been made in this area for ASP.NET 4, including the following:
* The ability to set meta tags.
* More control over view state.
* Easier ways to work with browser capabilities.
* Support for using ASP.NET routing with Web Forms.
* More control over generated IDs.
* The ability to persist selected rows in data controls.
* More control over rendered HTML in the FormView and ListView controls.
* Filtering support for data source controls.
Dynamic Data
For ASP.NET 4, Dynamic Data has been enhanced to give developers even more power for quickly building data-driven Web sites. This includes the following:
* Automatic validation that is based on constraints defined in the data model.
* The ability to easily change the markup that is generated for fields in the GridView and DetailsView controls by using field templates that are part of your Dynamic Data project.
Visual Web Developer Enhancements
The Web page designer in Visual Studio 2010 has been enhanced for better CSS compatibility, includes additional support for HTML and ASP.NET markup code examples, and features a redesigned version of IntelliSense for JScript. In addition, two new deployment features called Web packaging and One-Click Publish make deploying Web applications easier.
Posted in: C# and .NET| Tags: .NET 4.0 New asp.net Dynamic Data MVC Visual Web Developer