ASP的分页问题(运行结果为一个空白且读不出数据库的东东)

来源:百度知道 编辑:UC知道 时间:2024/06/14 17:01:00
1`若答对了将有100分相送
2. 数据库连接应该没有任何问题可就是读不出:
<!--#include file="conn.inc" -->
<!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>多页分析</title>
</head>
<body>
<table width="750" height="221" border="1">
<tr>
<td><%
Set rs =Server.CreateObject("Adodb.RecordSet")
sql="select * from test order by id Desc"
rs.open sql ,conn,1,1
if rs.eof and

不想看这个代码,给你我写的
ASP部分直接放到OPEN下面,修改rs.pagesize和shownum,把6.asp修改成你的显示页,就什么都不用管了,你先看看效果:

<< < 1 2 3 4 5 > >>,当前页次数字为红色,也提供文本框,输入数字直接跳转到具体页

<style type="text/css">
<!--
A:link {COLOR: #000000; TEXT-DECORATION: none}
A:visited {COLOR: #000000; TEXT-DECORATION: none}
A:active {COLOR: #000000; TEXT-DECORATION: underline}
A:hover {COLOR: #000000; TEXT-DECORATION: underline}
A.a01:link {text-decoration:none;color:#FF0000;}
A.a01:visited {color:#FF6600;}
A.a01:active {color:#FF6600;font-weight: normal;}
A.a01:hover {color:#FF6600;text-decoration: none;}
-->
</style>

<%
rs.pagesize=2
shownum=3 '每页数字分页显示分页序号的数目
rct=shownum*rs.pagesize

if request.querystring("wpage")<>"" and isnumeric(request.querystring("wpage"))=true then
pagenum=int(request.querystring("wpage"))*rs.pagesize-