Wednesday, April 13, 2011

Difference between DataList and Repeater controls

The DataList control is similar to the Repeater control. However, it has some additional properties and templates that you can use to display its data in a diverse fashion. The Repeater control does not have any built-in layout or style. We are forced to specify all formatting-related HTML elements and style tags. On the other hand, a DataList control provides more flexibility to display data in a desired layout. It also provides data selection and editing capabilities. How does it do it? Well, in addition to the five templates (Item Template, AlternatingItem Template, Separator Template, Header Template, Footer Template that a repeater has, the DataList control has two more templates: SelectedItemTemplate, and EditItemTemplate. These templates are useful for allowing data selection and data editing functionalities. 

No comments:

Post a Comment

Explain the different parts that constitute ASP.NET application.

Content, program logic and configuration file constitute an ASP.NET application. Content files Content files include static text, images ...