This code explains how to implement auto numbuering in gridview or
datalist in
asp.net
jst use <%#Container.ItemIndex +1%> in Datalist as given below
****************
<asp:DataList ID="DataList1" runat="server">
<ItemTemplate>
<div align=left> <table align="left"
cellspacing="1" style="width: 993px">
<tr>
<td class="style2">
<%#Container.ItemIndex + 1 %>
</td>
</tr>
</table></div>
</ItemTemplate>
</asp:DataList>
******************************
For grid use DataItemIndex instead of ItemIndex