Wednesday, December 9, 2009

DataList Control

The DataList control renders data as table and enables you to display data records in different layouts, such as ordering them in columns or rows. You can configure the DataList control to enable users to edit or delete a record in the table. The DataList control differs from the Repeater control in that the DataList control explicitly places items in an HTML table, where as the Repeater control does not.
The DataList control is, like the Repeater control, used to display a repeated list
of items that are bound to the control. However, the DataList control adds a table around the data items by default.
<asp:DataList ID="DataList1" runat="server">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
</ItemTemplate>
<AlternatingItemTemplate>
</AlternatingItemTemplate>
<EditItemTemplate>
</EditItemTemplate>
<SelectedItemTemplate>
</SelectedItemTemplate>
<SeparatorTemplate>
</SeparatorTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:DataList>

No comments:

Post a Comment