请教,我的库里有4条记录,我想每页显示两条记录,分两页,可是我的程序把库里的记录都显示在一个页面上了,而且分了两页,地址栏也有page=1..............page=2
我的程序如下:
<%
dim con,connstr
set con=server.createobject("adodb.connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("123.mdb")
con.open connstr
set rst=server.createobject("adodb.recordset")
rst.open "select * from liuyan",con,1,1
page=request("page")
if page="" or isnull(page) then
page=1
end if
rst.pagesize=2
page=cint(page)
if page<1 then
page=1
elseif page>rst.pagecount then
page=rst.pagecount
end if
rst.absolutepage=page
%>
<body>
<%
rst.movefirst
do while not rst.eof and not rst.bof
'while rst.eof<>true then
%>
<form id="form1" name="form1" method="post" action="guanli.asp">
<table width="750" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#AC9EC4">
<tr>
<td colspan="2"><font size="2"> 编号:<%=rst.Fields(14)%></font> </td>
</tr>
<tr>
<td width="81"><font size="2">提交时间:</font></td>
<td width="653"> <%=rst.Fields(13)%></td>
</tr>
<tr>
<td width="81"><font size="2">公司名称:</font></td>
<td width="653"> <%=rst.Fields(0)%></td>
</tr>
<tr>
<td><font size="2">所属行业:</font></td>
<td> <%=rst.Fields(1)%></td>
</tr>
<tr>
<td><font size="2">推广产品:</font></td>
<td> <%=rst.Fields(2)%></td>
</tr>
<tr>
<td><font size="2">公司地址:</font></td>
<td> <%=rst.Fields(3)%></td>
</tr>
<tr>
<td><font size="2">联系人:</font></td>
<td> <%=rst.Fields(4)%></td>
</tr>
<tr>
<td><font size="2">固定电话:</font></td>
<td> <%=rst.Fields(5)%></td>
</tr>
<tr>
<td><font size="2">手机号码:</font></td>
<td> <%=rst.Fields(6)%></td>
</tr>
<tr>
<td><font size="2">传真号码:</font></td>
<td> <%=rst.Fields(7)%></td>
</tr>
<tr>
<td><font size="2">E-mail:</font></td>
<td> <%=rst.Fields(8)%></td>
</tr>
<tr>
<td><font size="2">推广目标:</font></td>
<td> <%=rst.Fields(9)%></td>
</tr>
<tr>
<td><font size="2">预算费用:</font></td>
<td> <%=rst.Fields(10)%></td>
</tr>
<tr>
<td><font size="2">投放时间:</font></td>
<td> <%=rst.Fields(11)%></td>
</tr>
<tr>
<td><font size="2">其实需求:</font></td>
<td> <%=rst.Fields(12)%></td>
</tr>
</table>
</form>
<br>
<%
rst.MoveNext
'wend
loop
%>
<div align="right">
<% if page<>1 then%>
<a href="guanli.asp?page=1"><font size="2">第一页</font></a>
<a href="guanli.asp?page=<%=page-1%>"><font size="2">上一页</font></a>
<%end if%>
<% if page<>rst.pagecount then%>
<a href="guanli.asp?page=<%=page+1%>"><font size="2">下一页</font></a>
<a href="guanli.asp?page=<%=rst.pagecount%>"><font size="2">最后一页</font></a>
<%end if%>
</div>
</body>
</html>