asp下計(jì)算分頁的幾種方法
更新時(shí)間:2008年03月03日 20:38:46 作者:
asp分頁計(jì)算代碼
<%
'計(jì)算分頁的幾種方法
'// iRecordCount為要計(jì)算的頁面總數(shù)
'// iRecordCount為記錄集數(shù)
'// iPageSize為每頁記錄數(shù)
'// 一:
If iRecordCount Mod iPageSize = 0 Then
iPageCount = Int(iRecordCount / iPageSize)
Else
iPageCount = Int(iRecordCount / iPageSize) + 1
End If
'// 二:
iPageCount = Int(iRecordCount / iPageSize * -1) * -1
'// 三:
iPageCount = Abs(Int( - (iRecordCount / iPageSize)))
'// 四:
iPageCount = Fix(iRecordCount / iPageSize) - CInt(CBool(iRecordCount Mod iPageSize))
%>
'計(jì)算分頁的幾種方法
'// iRecordCount為要計(jì)算的頁面總數(shù)
'// iRecordCount為記錄集數(shù)
'// iPageSize為每頁記錄數(shù)
'// 一:
If iRecordCount Mod iPageSize = 0 Then
iPageCount = Int(iRecordCount / iPageSize)
Else
iPageCount = Int(iRecordCount / iPageSize) + 1
End If
'// 二:
iPageCount = Int(iRecordCount / iPageSize * -1) * -1
'// 三:
iPageCount = Abs(Int( - (iRecordCount / iPageSize)))
'// 四:
iPageCount = Fix(iRecordCount / iPageSize) - CInt(CBool(iRecordCount Mod iPageSize))
%>
相關(guān)文章
用VB生成DLL封裝ASP連接數(shù)據(jù)庫的代碼
用VB生成DLL封裝ASP連接數(shù)據(jù)庫的代碼...2007-02-02ASP UTF-8頁面亂碼+GB2312轉(zhuǎn)UTF-8 +生成UTF-8格式的文件(編碼)
ASP動(dòng)態(tài)網(wǎng)頁下UTF-8頁面亂碼+GB2312轉(zhuǎn)UTF-8 +生成UTF-8格式的文件(編碼)2008-10-10ASP常用日期格式化函數(shù) FormatDate()
這篇文章主要介紹了ASP常用日期格式化函數(shù) FormatDate(),很多情況下我們需要自定義輸出格式需要的朋友可以參考下2016-12-12