gridview
<asp:TemplateColumn HeaderText="编号">
<ItemTemplate>
<%# Container.DataItemIndex+1%>
</ItemTemplate>
< /asp:TemplateColumn>
Repeater:
</HeaderTemplate>
<ItemTemplate>
<tr><td><%# Container.ItemIndex+1%></td></tr>
</ItemTemplate>
< /asp:TemplateColumn>