ASP查询后分页显示问题!急救!
我做了个查询页面当我输入条件后,进入显示页面后第一页可以显示符合要求的记录,但当我点击下一页后,显示的记录就不在是我所要查询的记录了!问题是分页查询的参数没有带到下一页去?但是我又不会处理!请各位老兄帮帮忙解决!
原码如下:
<!--#include file= "../Conndb.asp "-->
<html>
<head>
<title> 货品库存查询--按客户货号 </title>
<%
CustCode = Trim(Request.Form( "CustCode "))
Session( "CustCode ") = CustCode
Session( "CurrentFields ") = "DES2 "
Set rs = Server.CreateObject( "ADODB.RecordSet ")
<!-- 读取数据到记录集rs中 -->
sql = "SELECT ITEM_CODE As 货品编号, DES As 货品名称, DES2 As 客户货号 " _
+ "FROM UN_ITEM1 WHERE DES2 Like ' " & CustCode & "% ' "
rs.Open sql,conn,1,1
<!-- 在表格中显示项目信息 -->
Rs.Pagesize=15
Page=CLng(Request.QueryString( "Page "))
if Page <1 then
Page=1
end if
if Page> Rs.PageCount then
Page=Rs.PageCount
end if
%>
</head>
<body link= "#000080 " vlink= "#080080 ">
<form name= "ItemForm " method= "POST " action= "ItemListBySecondName.asp ">
<p align= "center "> <font color= "#000080 "> <b> <font style= "font-size: 12pt "> 货 品 </font> <font color= "#000080 "> <b> <font style= "font-size: 12pt "> 库 存 </font> </b> </font> <font style= "font-size: 12pt "> 查 询( <%=Session( "SelectDataBase ")%> ) </font> </b> </font> </p>
<p align= "left "> <font color= "#000080 "> 按客户货号:
<input name= "CustCode " type= "text " id= "CustCode ">
<input name= "cmdQuery " type= "submit " id= "cmdQuery " value= "查询 ">
</font> <span class= "style1 "> %表示任意符号 _表示一个符号 </span> </p>
<font color= "000080 "> 当前页码: <%=Page%> / <%=Rs.PageCount%> </font>
<table align= "center " border= "1 " cellspacing= "0 " width= "100% " bordercolorlight= "#000080 " bordercolordark= "#FFFFFF ">
<tr>
<td width= "15% " align= "center " bgcolor= "#C1E0FF "> <strong> 货品编号 </strong> </td>
<td width= "25% " align= "center " bgcolor= "#C1E0FF "> <strong> 客户名称 </strong> </td>
<td width= "25% " align= "center " bgcolor= "#C1E0FF "> <strong> 货品名称 </strong> </td&