因为我一直没有在UserControl里面使用过QuickPager分页控件,我都是直接在.aspx里面使用,所以这个bug一直没有发现。后来告诉我他把分页控件放在了UserControl里面无法翻页的情况,检查之后才发现分页的事件没有传递到UserControl里面的分页控件里面,就是说分页控件没有得到分页事件。改了半天也没有找到从正规的方式来解决,所以只好采用了一个笨办法来解决。在UserControl里面使用分页控件的时候也稍稍有一点不同。
一般的情况是这么设置,
//
定义QuickPager_SQL,设置Page属性
Pager1.PagerSQL.Page = this .Page;
Pager1.PagerSQL.Page = this .Page;
在UserControl里面需要在多设置一个属性,其他的使用方法都是一样的。
//
定义QuickPager_SQL,设置Page属性
Pager1.PagerSQL.Page = this .Page;
Pager1.UserControl = this ;
Pager1.PagerSQL.Page = this .Page;
Pager1.UserControl = this ;
Demo下载:http://www.cnblogs.com/jyk/archive/2008/07/29/1255891.html
使用方法:
















































