asp+access,1.asp和2.asp。从1.asp中传递参数到2.asp。在2.asp中通过传来的参数查询结果并分页显示。但是第一页显示正常,第二页就不是查询的结果了!!后来发现第二页中没有接收到1.asp传来的参数。3天了,一直没有解决!!请高手指导!!!!附代码2.asp分页部分代码如下:
dim str
str=request.QueryString( "pname ")
sqlstr = "select * from product where pro_name= ' " & str & " ' "
...........
<td valign= "top " bgcolor= "#ECEEF2 ">
<table border= "0 " align= "center " cellpadding= "0 " cellspacing= "4 ">
<%
rs.pagesize = 4
page = clng(request( "page "))
if page < 1 then page = 1
if page> rs.pagecount then page = rs.pagecount
on error resume next
rs.absolutepage = page
%>
<%
for ipage = 1 to rs.pagesize
%>
<tr>
<%for i = 1 to 2 %>
<td>
<table width= "280 " border=1 align= "center " cellpadding= "0 " cellspacing= "0 " bordercolor= "#F6F7F9 " >
<tr>
<td width= "110 " height= "90 " rowspan= "2 ">
<div align= "center ">
<%imagepath=rs( "pro_imagefile ")%>
<img src= <%response.Write(imagepath)%> >
</div>
</td>
<td> <div align= "center ">
<%response.Write(rs( "pro_name "))%>
</div> </td>
</tr>
<tr>
<td> <div align= "right ">
<% response.Write( " <a href =display.asp?pid= " & rs( "id ") & "> 【 详细信息 】 </a> ")%> </div> </td>
</tr>
</table>
<%
rs.movenext
if rs.eof then
exit for
end if
next
if rs.eof then
exit for
end if
next
%>
</td>
------解决方案--------------------
http://blog.csdn.net/itzhiren/archive/2007/03/06/1522532.aspx
看一下吧,很实用
------解决方案--------------------
分页的时候把查询用到的所有参数全部传过去,即?后加上