咸丰重宝宝昌局珍品图:ASP中一个常见分页程序的问题...还请高手指点...

来源:百度文库 编辑:高校问答 时间:2024/04/29 13:14:51
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 '******************
bookmark=rs.bookmark '********
我的疑问是..这个BOOKMARK,在程序中好像根本就没起作用..(至少在功能上是这样,因为去掉它,同样可以实现分页)...

请问,这两行代码在这里起的什么作用呢...
谢谢这位仁兄,,,
*号是我加的...

可能是我说的不太明白...我的意思是..bookmark书签是做什么用的..

bookmark\只在这两行出现过...

你把这两行注释掉,看会不会影响程序的运行,如果不影响,那就没什么用,可以去掉。

应该是自动加入书签的功能,*号应该没有任何意义。

你没有把代码全写出来,你查找bookmark在别的哪个地方出现过就知道了