
This VIDEO TUTORIAL will demonstrate on how to format the data that is displayed with DataList and Repeater control based on the data itself. Whenever a DataList bound to a data source or programmatically through DataBind ( ) method, certain sequence of events occurs. In this sequence of events, first the DataList’s DataBinding event fires, data source is enumerated and each data record is bound to the DataList. In addition, DataList also creates DataListItem which is bound to the current record. During this process the DataList creates two event handlers ItemCreated and ItemDataBound. In order to demonstrate these events and to display the Product information in the DataList, the code from the Basics.aspx page is copied into Formatting.aspx page of DataListRepeaterBasics folder. Finally, the Repeater control that moved into this page from the Basics.aspx page is removed and the DataList’s product information display is examined at run time. For detailed information and source code for this step, please refer to the original article.