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
To bind columns manually which tags do you need to add within the asp:datagrid ?
Define page fragment caching?
what is loosely coupled solution? How it can be used?
What are the advantages of Web API?
Explain the procedure to handle the process request using mhpm events fired? : asp.net mvc
What is hidden field in asp.net?
What is application variable?
What is the difference between exe and dll?
Explain diff. Between friend and protected friend?
What are the validation controls available in ASP.NET?
How is mvc different from asp.net? : Asp.Net MVC
How can you make sure that web api returns json data only?
What is a session government?
Is asp.net a programming language or framework?
What is the function of new view engine in asp.net? : asp.net mvc