Friday, May 15, 2009

Add row number to Gridview in ASP.NET

  1. <asp:templatefield headertext="#">

  2. <itemtemplate>

  3. <%# Container.DataItemIndex + 1 %>

  4. </itemtemplate>

  5. </asp:templatefield>

No comments:

Post a Comment