asp分页问题?我点"上一页"没反映,点下一页就出现图中的现象,代码如下,什么情况帮忙看一下?

来源:百度知道 编辑:UC知道 时间:2024/05/30 10:39:51
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<!--#include file = "adovbs.inc" -->
<%
dim cnn,rst,access,currentpage,rowcount,i
currentpage = request.querystring("currentpage")
if currentpage = "" then
currentpage = 1
end if
set cnn = server.CreateObject("adodb.connection")
set rst = server.CreateObject("adodb.recordset")
cnn.connectionstring = "provider = microsoft.Jet.oledb.4.0; data source=" & server.mappath(&quo

建立access的数据库news,还有表news,表的字段(id,title),id唯一,输入数据保存,用下面代码可查询,可分页
-----------------------下面保存为search.asp--------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>文件</title>
</head>
<body bgcolor="#ffffff">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<script>
function btn_ck_bh_Click()
{
var cx = document.form1.cxsj.value;
form1.action ="search.asp?cx="+cx;
}
</script>
<table border="1" cellspacing="0" bgcolor="#F0F8FF" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF" width="88%" style="word-break:break-all">
<tr>
<td width="778" align="center" colspan="7">
<form me