asp无人能解决的问题?无经验的人误近!

来源:百度知道 编辑:UC知道 时间:2024/05/02 09:05:48
分页代码:
<%rs.pagesize=4
tt=rs.pagecount
page=request.QueryString("page")
if page="" then '限制代码
page="1"
end if
rs.AbsolutePage=page
%>
<%if rs.recordcount-page*rs.pagesize < 0 then
pagetotal=rs.recordcount-(tt-1)*rs.pagesize
else
pagetotal=rs.pagesize
end if
for i=1 to pagetotal step 1
if i mod 2 = 0 then
huanhang="<p>"
else
huanhang=""
end if
response.write rs("user")&huanhang
if (rs.recordcount-page*rs.pagesize > 0 ) then
rs.movenext()
end if
next%>
<%if page=1 then
firstpage=""
lastpage="尾页"
uppage=""
nextpage="下一页"
else if (page = int(tt)) then
firstpage="首页"
lastpage=""
uppage="上一页"
nextpage=""
else if (page>1 and page< int(tt)) then

算了,直接用我的这个分页得了

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Jester分页程序</title>
</head>

<body>
<%
On Error Resume Next '容错处理
'****************** Jester_asp菜鸟教程(删除)****************************
if request.querystring("action")="del" then '定义?action=del时运行下面的程序