瑞鲁手机APP下载网_专注推荐好用的手机APP和游戏APP

asp模块化分页制作详解

asp模块化分页制作详解

人气:1引自:手机APP下载网

模块化分页

 

1.查询语句块

 

<%取得当前文件名temp = Split(request.ServerVariables("URL"), "/")fy = temp(UBound(temp))set rs=server.createobject("adodb.recordset") if not isempty(request("page")) then   pagecount=cint(request("page"))   else   pagecount=1   end ifsql="select  查询语句"rs.open sql,conn,1,1 rs.pagesize=10  分页记录数if pagecount>rs.pagecount or pagecount<=0 then              pagecount=1              end if             if rs.eof and rs.bof then%>

 

 

对不起,没有符合搜索条件的记录!

 

2.显示记录块

 

<%elsers.AbsolutePage=pagecountdo while not rs.eof %>

 

显示的记录

 

<% i=i+2 rs.movenext if i>=rs.PageSize then exit do loop 'www.knowsky.com%>

 

3.分页效果

    <% if="" rs.pagecount="1" then="">         <%else%>      <form name=go2to form method=Post action=<%=fy%>>                  <% end="" if="">  <% end="" if="">

 

专题文集:ASP技巧 windows
引用标题:《asp模块化分页制作详解》
来源地址:https://www.sdruilu.cn/index.php/news/tpart-29896.html