zoukankan      html  css  js  c++  java
  • 如何查找FooterTemplate里的控件.

    在Repeater控件,ListView控件中都有FooterTemplate模板.但你在后台中如何去找FooterTemplate中的控件呢?

     

    如.<FooterTemplate>
        <tr>

              <td style="padding-left:10px; text-align:left;">

                   <asp:Label ID="lbCurrency" runat="server" Font-Bold="true" />

              </td>

         </tr>  

    </table>

         </FooterTemplate>

    这样就可以找到了:

      Label lbCurrency = (Label)ListView1.Controls[toolList.Controls.Count - 1].FindControl("lbCurrency"); //ListView1是这个主控件,或许是Repeater1

     

    注意*:在FooterTemplate里只有一个tr,如果有2个tr的,那么上面的写法就要改动一点点了.大家应该可以推理的出来.

  • 相关阅读:
    python 线程同步
    python 线程模块
    Python线程
    Python 多线程
    Python SMTP发送邮件
    Python Internet 模块
    简单实例
    Socket 对象(内建)方法
    Python 网络编程
    python 数据库错误处理
  • 原文地址:https://www.cnblogs.com/qfb620/p/1281298.html
Copyright © 2011-2022 走看看