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
What is server side in asp.net?
How does session work?
Explain about Multi-Language integration?
How may clustered index we can create in table?
How would ASP and ASP.NET applications run at the same time on the same server?
What are the new features added from ASP to ASP.NET?
What are url fragments?
Explain asp.net mvc request life cycle? : asp.net mvc
Which asp.net objects encapsulate the state of the client and the browser?
What is the full form of asp.net?
What is the use of ASP.NET routing?
How to disable cut, copy and paste in TextBox using jQuery in asp.net?
What are the advantages of passport authentication?
What are the advantages of using Master Pages?
What is ispostback method in asp.net?