GridView技巧1:加入序号

<asp:TemplateField HeaderText="序号" InsertVisible="False" SortExpression="LessonID">
 <ItemTemplate>
     <asp:Label ID="Label2" runat="server"  
      Text='<%# this.GridView1.PageIndex * this.GridView1.PageSize 
                        + this.GridView1.Rows.Count + 1
%>'  >
      </asp:Label>
</ItemTemplate>
</asp:TemplateField>
原文地址:https://www.cnblogs.com/fjchenq/p/527964.html