最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp文章分页
时间:2008-05-16 编辑:简简单单 来源:一聚教程网
<%
num_row=3 '每行放置的产品数
rows=3 '放置的产品行数
maxpp=num_row*rows '分页需要MaxPP
set rs=server.createobject("adodb.recordset")
sql="select * from shop_books where nclassid="&nid&" order by adddate desc"
rs.open sql,conn,1,1
if rs.eof then
response.Write"No record!"
else
page=cint(request("page"))
strFilename="auction2.asp?lx=big&anid="
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
totalPut=rs.recordcount
if (currentPage-1)*MaxPP>totalPut then
if(totalPut mod MaxPP)=0 then
currentPage=totalPut \ MaxPP
else
currentPage=totalPut \ MaxPP + 1
end if
end if
if currentPage=1 then(www.111com.net)
showContent
showpage totalPut,MaxPP,strFilename
else
if (currentPage-1)*MaxPP
showContent
showpage totalPut,MaxPP,strFilename
else
currentPage=1
showContent
showpage totalPut,MaxPP,strFilename
end if
end if
end if
%>
<%sub showContent%>
| " |
<%end sub%>
<%
function showpage(totalPut,MaxPP,filename)
dim n
if totalPut mod MaxPP=0 then
n=totalPut \ MaxPP
else
n=totalPut \ MaxPP+1
end if
response.write"
相关文章
- 彻底掌握ASP分页技术杂谈 07-31
- asp分页技术详解讲解(上一页/下一页) 05-07
- AspNetPage分页控件的应用实现教程 02-15
- Linq配合AspNetPager高效分页方法 06-01
- asp 分页实现代码 11-30
- asp 分页 上一页 下一页代码 04-02