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 postback request?
how to use html code in asp source code?
Explain how can we access static variable?
What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
What is page fragment caching?
Is razor a programming language?
What is the difference between a multi-layer and multi-tier applications?
Explain the advantages of caching?
What is caching? What are the different types of caching?
Name the application folders present in asp.net 2.0?
Types of optimization and name a few ?
How do you bind array to gridview? Will it works?