GridView自动序号

<asp:TemplateField HeaderText="序号">
    <ItemTemplate>
        <asp:Label ID="Label1" runat="server" Text="<%# Container.DataItemIndex + 1%> "></asp:Label>
    </ItemTemplate>
    <ItemStyle Width="30px" />
</asp:TemplateField>
posted on 2007-11-07 00:31  一路前行  阅读(524)  评论(0编辑  收藏  举报