ASP中一个常见分页程序的问题...还请高手指点...
来源:百度知道 编辑:UC知道 时间:2024/06/07 07:54:04
MaxPerPage=20
totalPut=rs.recordcount
if currentpage<1 then currentpage=1
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
showContent
showpage totalput,MaxPerPage,"grhouse.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage '******
dim bookmark '******************
bookmark=rs.bookmark '********
showContent
showpage totalput,MaxPerPage,"grhouse.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"grhouse.asp"
end if
end if
请注意带*号的位置...
dim bookmark '******************
totalPut=rs.recordcount
if currentpage<1 then currentpage=1
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
showContent
showpage totalput,MaxPerPage,"grhouse.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage '******
dim bookmark '******************
bookmark=rs.bookmark '********
showContent
showpage totalput,MaxPerPage,"grhouse.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"grhouse.asp"
end if
end if
请注意带*号的位置...
dim bookmark '******************
你把这两行注释掉,看会不会影响程序的运行,如果不影响,那就没什么用,可以去掉。
应该是自动加入书签的功能,*号应该没有任何意义。
你没有把代码全写出来,你查找bookmark在别的哪个地方出现过就知道了