网页数据表格自动填充序号

<asp:Repeater EnableViewState="false" ID="Repeater1" runat="server">
                <HeaderTemplate>
                    <table cellspacing="0"  border="1" id="main_GridView1" width="100%">
                        <tr bgcolor="#CCCCFF">
                            <th style="width: 15%">
                                Guid</th>
                            <th style="width: 15%">
                                序号</th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr bgcolor="#FAF3DC">
                        <td>
                            <%# DataBinder.Eval(Container.DataItem, "sGuidID") %>
                        </td>
                        <td>
                            <%# this.Repeater1.Items.Count + 1%>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>

 

转载自http://www.cnblogs.com/zhwl/archive/2012/02/22/2363306.html

posted @ 2012-02-23 13:51  陈鹏C  阅读(381)  评论(0编辑  收藏  举报