zoukankan      html  css  js  c++  java
  • Repeater 绑定

    前台容器Repeater的关键代码:

     <!--列表展示.开始-->
        <asp:Repeater ID="rptList" runat="server" onitemcommand="rptList_ItemCommand" OnItemDataBound="rptList_ItemDataBound">
        <HeaderTemplate>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
          <tr>
              <th width="6%"  align="left">第一列</th>
              <th width="15%" align="left">第二列</th>

          </tr>
        </HeaderTemplate>
        <ItemTemplate>
          <tr>
                <td><%#Eval("第一列ID")%></td>
                <td><%#Eval("第二列ID")%></td>
            
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            <%#rptList.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"7\">暂无记录</td></tr>" : ""%>
          </table>
        </FooterTemplate>
        </asp:Repeater>

    后台代码:

     DataSet _invWasteDs = 获得的数据;
                this.rptList.DataSource = _invWasteDs;
                this.rptList.DataBind();

  • 相关阅读:
    Mysql其他
    Linux大全
    Django-你想知道的都在这里
    k8s
    极速安装k8s 快速融入学习
    flask orm
    Elasticsearch
    1爬虫
    MY git 操作
    docker 骚操作
  • 原文地址:https://www.cnblogs.com/northeastTycoon/p/2756722.html
Copyright © 2011-2022 走看看