asp.net repeater Container.ItemIndex
<asp:Repeater ID="myRepeater" runat="server"> <HeaderTemplate> <table> </HeaderTemplate> <ItemTemplate> <tr> <td><%# Container.ItemIndex %></td> <!-- or maybe --> <td><%# Container.ItemIndex + 1 %></td> <td><%# DataBinder.Eval(Container, "DataItem.Name") %></td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater>
http://stackoverflow.com/questions/10009431/what-is-the-easiest-way-to-put-an-index-to-repeater-in-net