: Http://www.webdiyer.com/Products/AspNetPager/Downloads
Aspnetpager paging example: http://www.webdiyer.com/AspNetPagerDemo/ApplyStyles/default.aspx
After the download, you can pull the control into vs. Note that vs2003 cannot be used! The following code is used:
Protected void pagerw.pagechanged (Object sender, eventargs E)
{
Oracleconnection objcon = This. getcon ();
String querystr = "select * from Stu ";
Oracledataadapter da = new oracledataadapter (querystr, objcon );
Dataset DS = new dataset ();
Da. Fill (DS, "Stu ");
This. gridview1.datasource = This. getpage (DS);/*** the main steps are as follows ***/
This. gridview1.databind ();
}
Public pageddatasource getpage (Dataset DS)
{
This. pager1.recordcount = Ds. Tables [0]. Rows. count;
Pageddatasource PPS = new pageddatasource ();
PDS. datasource = Ds. Tables [0]. defaultview;
PPS. allowpaging = true;
PDS. currentpageindex = pager1.currentpageindex-1;
PPS. pagesize = pager1.pagesize;
Return PPS;
}
You just need to replace the interaction between the Code and the database with your own, that's OK! Try it!