What is the difference between repeater controls and Datalist?
i just want to know how both of these are used and how do they differ.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kunal NaikPosted Oct 19, 2011, 3:28 PM
The DataList control is similar to the Repeater control. It has some more 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. While, a DataList control provides more flexibility to display data in a desired layout. It also provides data selection and editing capabilities. 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.
Also see below link to know when to used these controls,
Click Here
Javeed M ShaikhPosted Oct 19, 2011, 3:08 PM
The following are a few points:
The datalist has some additional properties and templates that you can use to display its data on the other hand the Repeater control does not have any built-in layout or style and we are forced to specify all formatting-related HTML elements and style tags. The Datalist provides data selection and editing capabilities (SelectedItemTemplate, and EditItemTemplate). The events in the datalist are different than those in Repeater control.