<%
strSql="select * from [paper] where type='" & request("type") & "' order by id desc"
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open strSql,conn,3,3
rs.PageSize=25
PageNo=request("PageNo")
if PageNo<1 or not isnumeric(PageNo) then
PageNo=1
end if
if cint(PageNo)>rs.PageCount then
PageNo=rs.PageCount
end if
%>
<%
if rs.recordcount>0 then
rs.AbsolutePage =PageNo
for i=1 to rs.pageSize
if rs.eof then exit for
%>