Which template must you provide, in order to display data
in a Repeater control?
Answer Posted / anilkumar
Example for better idea
<asp:Repeater id="Repeater1" runat="server">
<HeaderTemplate>
<table cellpadding="5" cellspacing="2" >
<tr bgcolor=Gray>
<td><b>CustomerName</b></td>
<td><b>Country</b></td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#
DataBinder.Eval(Container.DataItem,"CustomerName") %></td>
<td><%# DataBinder.Eval(Container.DataItem,"Country")
%></td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr bgcolor="#ccccff">
<td><%#
DataBinder.Eval(Container.DataItem,"CustomerName") %></td>
<td><%# DataBinder.Eval(Container.DataItem,"Country")
%></td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How to send a DataReader as a parameter to a remote client ?
What is cache in asp net?
How do we assign page-specific attributes?
What are the three parts of an http response?
How many types of controls are there in asp.net?
How can we inherit a static variable?
Define common type system?
What is a Cookie? Where is it used in ASP.NET?
What are the layouts of ASP.NET Pages?
What are the two types of web pages?
What is ispostback property?
Give an example of cookie abuse.
Diff between web user control and web custom control?
What are the namespace classes used in asp.net mvc? : asp.net mvc
What does mean by a neutral culture?