看了园子里的文章,有感而发,用Linq去实现。
http://blog.csdn.net/lipan2/archive/2008/09/14/2795707.aspx
此节主要关注Linq的分页,源代码在后边附上(喜欢附上源代码)

客服端代码:

        <asp:GridView ID="gridViewCourse" runat="server" AllowPaging="True" 
            AllowSorting
="True" AutoGenerateColumns="False" 
            PageSize
="5" Width="614px" 
            onpageindexchanged
="gridViewCourse_PageIndexChanged" 
            onpageindexchanging
="gridViewCourse_PageIndexChanging">
            
<Columns>
                
<asp:BoundField DataField="Cno" HeaderText="学号" />
                
<asp:BoundField DataField="Name" HeaderText="姓名" />
                
<asp:BoundField DataField="Time" HeaderText="入学时间" />
                
<asp:BoundField DataField="Money" HeaderText="" />
            
</Columns>
        
</asp:GridView

相关文章:

猜你喜欢
  • 2022-12-23
  • 2021-09-29
  • 2022-02-09
相关资源
相似解决方案