<%
'Several ways to calculate paging
'//iRecordCount is the total number of pages to be calculated
'//iRecordCount is the number of recordsets
'//iPageSize is the number of records per page
'//one:
IfRecordCountModiPageSize=0Then
iPageCount=Int(iRecordCount/iPageSize)
Else
iPageCount=Int(iRecordCount/iPageSize)+1
EndIf
'//two:
iPageCount=Int(iRecordCount/iPageSize*-1)*-1
'//three:
iPageCount=Abs(Int(-(iRecordCount/iPageSize)))
'//Four:
iPageCount=Fix(iRecordCount/iPageSize)-CInt(CBool(iRecordCountModiPageSize))
%>
Articles that may be of interest to you:
ASP paging class (supports multi-style transformation) A thorough understanding of ASP paging technology A detailed analysis of asp paging (2 paging programs organized by yourself) Yixin asp paging class v1.0 asp paging generates HTML program script code thoroughly mastering ASP paging technology A class of asp paging simple ASP paging code (test correctly) A little experience of flash and asp paging and flash script js implementing ASP paging function HTML paging function Leaf Asp paging class Several algorithms for calculating the total number of pages when ASP paging