Control Templates

Topic updated 17-10-2007

Most functional parts of the user interface in projects based on the ASP.NET 2.0 Templates are created by adding Control Templates to Page Templates. Control Templates add ASP.NET Web server controls (from the .NET Framework's System.Web.UI.WebControls namespace) to pages. Many Control Templates generate multiple ASP.NET Web server controls, generating both visual components and the code that implements control behaviour. Control Templates configure the generated Web server controls and make them work together.

The following types of Control Templates exist:

Databound Control Templates generate user interface elements that display data from the database, plus the data binding code needed to connect controls to the right datasources. Databound Control Templates have template hierarchies that include Property Templates and Action Templates.
Property Templates map single fields from database entities to user interface elements such as grid columns and form fields.
Action Templates generate user interface elements such as buttons and links, giving control to users viewing and editing data. Action Templates control navigation between Browse Templates and Form Templates, and generate the code that calls BO-Layer methods to perform data updates.

 

The Control Toolbox of the WebForm Designer contains the following Control Templates:

Browse Template
Form Template (both detail view and form view)
Drop down template
Locator Template
Menu Template
TreeView template (in upcoming versions)
Validation Template

 

ToolboxControlTemplates