Using ASP Server Controls Templates

You might come across a different web application where you need to have a different layout and different style for your grid controls. It is possible to do this with the ASP.Net Server Control Templates. With the templates you can define a particular layout and style for that control.

Controls and html elements are used in combination to create the layout needed for you for that particular control. For example if you are going to use a Grid View control then you can have different style for the rows in that control.

You should also know the difference between a template and the styles. A template is related to the layout of the content and what type of content is needed for you control.

Style is something that is related to the appearance of the content that is defined in the layout. In style you will be changing the font, color and others. Not all the controls support templates.

Some of the controls that support templates are Repeater, DataList, GridView, DetailsView, FormView, and Login. For more details on the different types of controls that support templates you may refer to the MSDN online.