[求助]查询出来的信息怎么分页显示出来
我查询出来的信息,可以分页显示,但是不能换页,请各位高手知道一下,代码如下<%
if request.Form("submit2")="搜索" then
select1 = request.QueryString("select1")
select1 = request.Form("select1")
txttitle = request.Form("txttitle")
set rs = server.CreateObject("ADODB.Recordset")
if request.Form("select1")="" and request.Form("txttitle")="" then
rs.open "select newid as 新闻ID ,newtitle as 新闻标题,newasstitle as 新闻副标题 ,newtime as 上传时间,newstpye as 新闻类型,newOfferMan as 上传人用户名 from TYnew where newstart = '未审查'",cn,3,2
rs.pagesize = 10
page = clng(request("page"))
if page < 1 then page = 1
if page > rs.pagecount then page = rs.pagecount
%>
</p>
<table border="0" height=50 align="center" class="txt_border" >
<tr><td></td>
<%for i = 0 to rs.fields.count-1
'response.Write "<td>"&rs.fields(i).name&"</td>"
next%>
</tr>
<% rs.absolutepage = page
for ipage =1 to rs.pagesize
recno = (page-1) *rs.pagesize+ipage
%>
<tr><td></td>
<%for i = 0 to rs.fields.count-1%>
<td><a href="updatenew.asp?newID=<%=rs.fields(0)%>&pagestart=1"> <%=rs.fields(i).value%></a> </td>
<%next%>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
%>
</table> <span class="style31"> <p align="center">
<%
if page <>1 then
response.Write "<a href = updatenew2.asp?page=1&selete1 ="&request.Form("select1")&">第一页</a>&nbsp;&nbsp;"
response.Write "<a href = updatenew2.asp?page=" & (page-1) & "&selete1 ="&request.Form("select1")&"> 上一页</a>&nbsp;&nbsp;"
end if
if page <> rs.pagecount then
response.Write "<a href = updatenew2.asp?page=" & (page+1) & "&selete1 ="&request.Form
("select1")&"> 下一页</a>&nbsp;&nbsp;"
response.Write "<a href = updatenew2.asp?page=" & rs.pagecount &"&selete1="&request.Form("select1")&">最后一页</a>"
end if
%>
</p> <p align="center">页数:<%=page%>/<%=rs.pagecount%>
</p></span> <%end if%>