Google分页控件1.1版发布,支持数据源输出

2006年10月9日  |  1:03 下午分类:Develop  |  标签:  |  

在1.0版的基础上作了以下改进:
# 支持将数据源输出。表明你可以将数据控件的DataSource指定为该分页控件。
# 无需指定记录数。记录数在控件中已进行计算。
# 需指定SQL语句。
# 虽然有ExecuteType的枚举,但并未实现,目前只支持ExecuteType.Text的枚举。
示例代码:
//取页码
if (Request.QueryString["page"] != null)
{
_pageindex = Int16.Parse(Request.QueryString["page"]);
}

this.Pager1.CurrentPage = _pageindex;
this.Pager1.Sql = “select subject from documents order by publishdate desc”;
this.GridView1.DataSource = this.Pager1.GetDataSource(connectionstring);
this.GridView1.DataBind();

GetDataSource方法有一个重载:
public DataView GetDataSource(string connectionstring)
public DataView GetDataSource(SqlConnection conn)

转载时务必以超链接形式标明文章原始出处和作者信息。

1位领导已批示 关于 “Google分页控件1.1版发布,支持数据源输出”

  1. 幻想曲 发表于: 十月 18th, 2006 12:34 下午

    该控件是在vs2005/.net 2.0下编写
    在1.1下可能无法加载到工具箱


发表您的评论

1410168172122013183195114157619