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
Explain the difference between webfarm and webgardens in .net?
What is sta?
How would ASP and ASP.NET applications run at the same time on the same server?
Are cookies client side or server side?
What is dynamic web page with example?
How ASP and ASP.NET page works? Explain about asp.net page life cycle?
Explain the difference between page.registerclientscriptblock and page.registerstartupscript?
How is session id generated?
Explain what is viewstate?
What is the viewstate in asp.net?
Explain the components of web form in asp.net
How do you deploy your asp.net application?
What is a master page and what does it do?
How can you ensure a permanent cookie?
Diff between web user control and web custom control?