【Repeater】根据第二列 来取第一列的自动增加序号
请问大家——怎么根据第二列 来取第一列的自动增加序号
- HTML code
<asp:Repeater ID="commentlist" runat="server"> <HeaderTemplate> </HeaderTemplate> <ItemTemplate> <tr> <td class="style1"> <%-- 第 <%# (当前页-1)*总页数+ Container.ItemIndex + 1%> 名--%> 第<asp:Label ID="Ranking" runat="server" Text="<%# (GetData() - 1) * GetDataall() + Container.ItemIndex + 1%>"></asp:Label> 名 </td> <td class="style1"> <a href="" target="_blank"> <%#Eval("StudentName")%></a> </td> <td class="style6"> <%#Eval("danwei")%> </td> <td class="style4"> <%#Eval("score")%> </td> <td style="width: 127px"> <%#Eval("toupiao")%> </td> </tr> </ItemTemplate> <FooterTemplate> </FooterTemplate> </asp:Repeater>
[解决办法]
Repeater 做这样功能可不是很好做。。
JS可以解决
百度 关键字是:JS table 序号 或者编号 增加一行
[解决办法]
全部正则 判断
默认的给第一行一个 值