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();

  • 相关阅读:
    元组tuple
    列表list
    day11---闭包函数
    day10函数对象,嵌套,名称空间,作用域
    day10函数对象,嵌套,名称空间,作用域
    day--函数
    day8--文件管理2
    day ---7,文件管理
    day7,文件编码
    day6---字典,集合内置方法
  • 原文地址:https://www.cnblogs.com/northeastTycoon/p/2756722.html
Copyright © 2011-2022 走看看