zoukankan      html  css  js  c++  java
  • 页面列表的两种方法

    1、在后台为rpShow绑定list,前台可直接绑定每一列的值
                 <asp:Repeater ID="rpShow" runat="server">
                        <ItemTemplate>
                            <tr onmouseover="onChangeItem(this,1)" onmouseout="onChangeItem(this,2)">
                                <td align="center"><%# (Container.ItemIndex+1) %></td>
                                  <td align="left">&nbsp;&nbsp;<a class="abtn2" style="cursor:pointer;" href="View.aspx?keyid=<%# Eval("Id")%>                                "  ><%# Eval("Title")%></a></td>
                                <td align="center"><%#string.Format("{0:yyyy-MM-dd HH:mm}", Eval("ReceiveDate"))%></td>
                                <td align="center" style="word-wrap:break-word;word-break:break-all">&nbsp;&nbsp;<%# Eval("FromUnit")%></td>
                                 <td align="center">&nbsp;&nbsp;<%# Eval("ProcessID")%></td>
                                  <td align="center">&nbsp;&nbsp;<%# Eval("ReceiveNumber")%></td>
                                <td align="center"><%# GetUserName(Eval("UserCode").ToString())%></td>
                            </tr>
                        </ItemTemplate>
                  </asp:Repeater>


    2 直接循环<tr>
                <% foreach (FileChange_RecordShow i in List)
                    { %>
                     <tr onmouseover=" onChangeItem(this, 1) " onmouseout=" onChangeItem(this, 2) ">
                         <td align="center"><%= i.SOURCESYSTEMNAME%></td>
                         <td align="center"><%= i.SOURCEMODULEIDNAME%></td>                     
                         <td align="center"><%= i.FILENAME%></td>
                         <td align="center"><%= i.FILESIZE%></td>
                         <td align="center"><%= i.CHANGETIME.ToString("yyyy-MM-dd HH:mm:ss")%></td>
                     </tr>
                 <% } %>
  • 相关阅读:
    Linxu下段错误(segmentation fault)的调试
    n900破解无线路由密钥(wep)
    windows 7 下安装运行VC6
    【转载】W32Dasm反汇编工具使用详解
    用PreCode Snippet代码高亮
    转——别告诉我能懂PPT
    程序员必须掌握的基本正则表达式
    简单之美—软件开发实践者的思考—故事场景1
    xml解析
    Android Frameworktouch事件派发过程深入理解
  • 原文地址:https://www.cnblogs.com/zecVip/p/4481144.html
Copyright © 2011-2022 走看看