zoukankan      html  css  js  c++  java
  • .net3.5正统分页控件来了(ListView和DataPager)

          asp.net又新增了一个有用的控件,这次可是微软内置的控件了,看看下面的图,多了什么东西呢?



    ListView和DataPager

    DataPager控件能支持实现IPageableItemContainer接口的控件

    ListView是现有控件中唯一实现此接口的控件,此控件功能还算强大,来熟悉下页面代码,以后图方面的同志,又可以少几行代码写写了

    <asp:ListView runat="server" ID="ListView1" DataSourceID="SqlDataSource1" 
            DataKeyNames
    ="ProductID">
            
    <layouttemplate>
                
    <table runat="server">
                    
    <tr runat="server">
                        
    <td runat="server">
                            
    <table id="itemContainer" runat="server" border="0" style="">
                            
    </table>
                        
    </td>
                    
    </tr>
                    
    <tr runat="server">
                        
    <td runat="server" style="">
                            
    <asp:datapager ID="DataPager1" runat="server">
                                
    <fields>
                                    
    <asp:nextpreviouspagerfield ButtonType="Button" ShowFirstPageButton="True" 
                                    ShowNextPageButton
    ="False" ShowPreviousPageButton="False" />
                                    
    <asp:numericpagerfield />
                                    
    <asp:nextpreviouspagerfield ButtonType="Button" ShowLastPageButton="True" 
                                    ShowNextPageButton
    ="False" ShowPreviousPageButton="False" />
                                
    </fields>
                            
    </asp:datapager>
                        
    </td>
                    
    </tr>
                
    </table>
            
    </layouttemplate>
            
    <itemtemplate>
                
    <tr runat="server" style="">
                    
    <td>
                        ProductID: 
    <asp:Label ID="ProductIDLabel" runat="server" 
                        Text
    ='<%# Eval("ProductID") %>' /></td><td>ProductName: <asp:Label 
                        
    ID="ProductNameLabel" runat="server" Text='<%# Eval("ProductName") %>' /></td></tr>
            
    </itemtemplate>
            
    </asp:ListView>


     

    最近好戏连台,Adobe的flash cs 3也发布了
  • 相关阅读:
    paip.云计算以及分布式计算的区别
    paip.索引的种类以及实现attilax 总结
    paip.分布式应用系统java c#.net php的建设方案
    paip.提升性能--多核编程中的java .net php c++最佳实践 v2.0 cah
    paip.中文 分词 ---paoding 3.1 的使用
    paip.2013年技术趋势以及热点 v2.0 cae
    paip.为什么使用多线程的原因.
    paip.提升性能--多核cpu中的java/.net/php/c++编程
    paip.重装系统需要备份的资料总结..v2.0 cad
    paip.禁用IKAnalyzer 的默认词库.仅仅使用自定义词库.
  • 原文地址:https://www.cnblogs.com/Clingingboy/p/ListView.html
Copyright © 2011-2022 走看看