In ASP.Net Repeater Control provides the functionality as a Data bound control and displays the retrieved data in repeating list form. You can use HTML tags and CSS styles to customize the appearance of the data in Repeater Control. In Repeater Control layout of items can be defined by using templates inside the <asp:Repeater> and </asp:Repeater> tags. Itemtemplate is the required template field of the ASP.Net Repeater control to display the list items on the web page after rendering the control. There are some other templates that can be used to customize the layout of the Repeater control in ASP.Net
Following are the five types of the Repeater Control templates that can be used to change the appearance and layout placement of controls inside the Repeater Control so that it could generate the well define user interface of web page:
ASP.Net Repeater control does not render the HTML <table> tag while rendering the data items. It renders only the specified HTML tags used to define the layout of the ItemTemplate. Repeater Control iterates the layout defined in the ItemTemplate and AlternateItemTemplate (if defined). All templates except ItemTemplate are optional and render only if ItemTemplate of Repeater control is defined.
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate></ItemTemplate>
<AlternatingItemTemplate></AlternatingItemTemplate>
<SeparatorTemplate></SeparatorTemplate>
</asp:Repeater>
Be the first to rate this post
Tags: asp.net 2.0, asp.net repeater control, asp.net sample, repeater itemtemplate, repeater alternateitemtemplate, repeater separatortemplate, repeater headertemplate, repeater footertemplate, asp.net repeater databinding, asp.net repeater dynamic, asp.net nested repeater, asp.net repeater table, asp.net repeater div
10/11/2008 3:35:42 AM