Repeater控件分页例子
作者:孟宪会 出自:【孟宪会之精彩世界】 发布日期:2003年9月11日 10点11分43秒
Repeater和DataList控件提供了一个快速、灵活的表现数据的方式,但是,它们没有内建的分页功能;DataGrid控件提供了内建的分页功能,但它的结构比较复杂。下面就用PagedDataSource类实现Repeater和DataList的分页。 PagedDataSource封装了DataGrid的分页属性,我们可以象DataGrid那样进行分页。代码如下:
查看例子
C#版本
1@ Page Language="C#"
2``` ```
3@ import namespace="System.Data"
4``` ```
5@ import namespace="System.Data.OleDb"
| 上一页 下一页
1# DataBinder.Eval(Container.DataItem, "Title")
VB.NET版本
1@ Page Language="VB"
2``` ```
3@ import namespace="System.Data"
4``` ```
5@ import namespace="System.Data.OleDb"
| 上一页 下一页
1# DataBinder.Eval(Container.DataItem, "Title")