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

in 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 Comment

One Comment

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

Leave a Reply

Using Gravatars in the comments - get your own and be recognized!

XHTML: These are some of the tags you can use: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>