asp分页代码解释

来源:百度知道 编辑:UC知道 时间:2024/06/05 21:18:13
希望哪位给详细解释一下,特别是curretnpage
if Rs.eof and Rs.bof then
response.Write("没有查询到所需的文章。")
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage totalput,MaxPerPage,"search.asp"
showContent
showpage totalput,MaxPerPage,"search.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"

是分页跳转用的,是把全部符合条件的记录分的总页数,记录条数多了一页是装不下的嘛

currentPage指的是当前的页数

应该是判断页面跳转

这个没什么好解释的
就是几个过程的调用```