Databases Reference
In-Depth Information
ASP.NET Dynamic Data offers an alternative solution to the CRUD problem. Instead of
generating pages at design time, like the WebForms and MVC tools do, it generates pages
at runtime with the help of page templates.
Built-in Page Templates
When users of a web application need to perform a particular action, such as creating,
reading, or modifying an instance of a particular entity type, Dynamic Data can use a
single dynamic page template to handle this action across all entity types:
namespace System.Web.DynamicData
{
public static class PageAction
{
public static string Details { get { return “Details”; } }
public static string Edit { get { return “Edit”; } }
public static string Insert { get { return “Insert”; } }
public static string List { get { return “List”; } }
}
}
Out of the box, Dynamic Data understands actions defined in the PageAction class and
provides page templates (see Figure 6.1) for inserting, displaying details, editing, and
listing entities as part of the new website and web application projects in Visual Studio.
FIGURE 6.1 Page templates in a Dynamic Data web application project.
Page templates are special ASPX forms located in the DynamicData/PageTemplates folder
of the web application. They rely on URL routing functionality of ASP.NET to handle page
requests for different entity types. Dynamic Data applications register at least one
 
 
Search WWH ::




Custom Search