Home > Getting Started > ASP.NET Syntax > ASP.NET Page Syntax > Server Control Inline Template Syntax
ASP.NET Syntax ASP.NET Page Syntax
Customizes the look and layout of ASP.NET server controls that support templates.
<templatename>
Server control, databinding syntax, and so on
</templatename>
templatename |
The name of the ASP.NET server control template. |
Templates allow you to customize the presentation of server controls on the pages in which they appear.
The following ASP.NET server controls support templates: the Repeater, DataList, DataGrid, GridView, FormView, and, to a limited extent, the DetailsView.
Template properties allow you to set how each template will render at runtime. You can include multiple template properties in a server control declaration.
Template syntax must be contained between the opening and closing tags of one of these server controls or between the opening and closing tags of a custom server control you have created.
The below examples show how you can display data retrieved from a data source using templates on several of the ASP.NET controls that support them. The layout of the information is typically specified in an ItemTemplate, each actually representing an individual record from the data source.
Introducing ASP.NET Web Forms