Which template must you provide, in order to display data
in a Repeater control?
Answers were Sorted based on User's Feedback
Answer / rakhi
Itemtemplate defines how items or data in the Repeater
control are displayed.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / 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 |
What is query string? What are its advantages and limitations?
How do you do Client-side validation in .Net?
What is asynchronous call?
What is marshalling ? Is it a part of asp.net ?
What are the modes of updation in an updatepanel? What are triggers of an updatepanel?
What is page request in asp.net?
Why we go for mvc instead of asp.net? : Asp.Net MVC
How to stop the inheritance?
What does setting a control's EnableViewState property to false accomplish?
what is client back feauture ?
Which is better session or viewstate?
how can i call output parameters from ado.net