ASP Classic Pagination Class
Source
'=================================================================================================
'XDOWNPAGEASP Version
'version 1.00
'Codebyzykj2000
'Email:[email protected]
'BBS:http://bbs.513soft.net
'This program can be used and modified for free. I hope my program can bring convenience to your work
'But please keep the above please refusal
'
'Program Features
'This program mainly encapsulates the data paging part, and the data display part is completely customized by the user.
'Support multiple URL parameters
'
'Instructions for use
'Program Parameter Description
'PapgeSize defines the number of records for each page of the paging page
'GetRS returns a paged Recordset This property is read only
'GetConn gets the database connection
'GetSQL gets query statement
'Program method description
'ShowPage displays the page navigation bar, the only public method
'
'example:
'
''Include files
'
'Setmypage=newxdownpage' create object
'mypage.getconn=conn' get the database connection
'mypage.getsql="select*fromproductinfoorderbyidasc"
'mypage.pagesize=5'Set the record data of each page to 5
'setrs=mypage.getrs()' returns Recordset
'mypage.showpage()' displays paging information. This method is OK after setrs=mypage.getrs()
'Called at any location, can be called multiple times
'fori=1tomypage.pagesize'The next operation is the same as operating a normal Recordset object
'ifnotrs.eofthen' is to prevent the last page from overflowing
'response.writers(0)&"
"'You can customize the display method here
'rs.movenext
'else
'exitfor
'endif
'next
'
'=================================================================================================
ConstBtn_First="9"'Define the display style of the first page button
ConstBtn_Prev="3"'Define the previous page button display style
ConstBtn_Next="4"'Define the next page button display style
ConstBtn_Last=":"'Define the last page button display style
ConstXD_Align="center"'Define the alignment of paging information
ConstXD_Width="100%"' defines the size of the paging information box
ConstXD_Height="20"
ClassXdownpage
PrivateXD_PageCount,XD_Conn,XD_Rs,XD_SQL,XD_PageSize,Str_errors,int_curpage,str_URL,int_totalPage,int_totalRecord