请帮忙看看这个分页程序!
请大家帮忙看看这个程序,可以分页,但是上一页,下一页却不起作用,而且总是读取同一条信息是怎么回事?
<!-- #INCLUDE FILE="conn.asp" -->
<%
response.buffer=true
Response.Expires=0
sql="select * from news where news_native='"&request("native")&"' order by news_date"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1
page=1
rs.PageSize =20
if Not IsEmpty(Request("Page")) then
Page = CInt(Request("Page"))
if Page > rs.PageCount then
rs.AbsolutePage = rs.PageCount
elseif Page <= 0 then
Page = 1
else
rs.AbsolutePage = Page
end if
End if
intCurPage = rs.AbsolutePage
%>
<body bgColor="#ffffff" topMargin="0" link="#2F4F4F" vlink="#2F4F4F" alink="#2F4F4F" text="#808080" leftmargin="0" marginwidth="0" marginheight="0">
<div align="center">
<center>
<table width=778 border=0 cellpadding=0 cellspacing=0>
<tr>
<td> <img src="images/top_01.jpg" width=78 height=84></td>
<td> <img src="images/top_02.jpg" width=78 height=84></td>
<td> <img src="images/top_03.jpg" width=77 height=84></td>
<td> <img src="images/top_04.jpg" width=78 height=84></td>
<td> <img src="images/top_05.jpg" width=78 height=84></td>
<td> <img src="images/top_06.jpg" width=78 height=84></td>
<td> <img src="images/top_07.jpg" width=78 height=84></td>
<td> <img src="images/top_08.jpg" width=77 height=84></td>
<td> <img src="images/top_09.jpg" width=78 height=84></td>
<td> <img src="images/top_10.jpg" width=78 height=84></td>
</tr>
</table>
<table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/bg.jpg" width="230" rowspan="2"> </td>
<td> </td>
</tr>
<tr>
<td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="p9-150"> <font color=#FF9933> <b> </b></font>
<div align="left"><font color="#000000"><span class=txt> </span><br>
<%if page<>1 then%>
<a Href="nesw2.asp?Page=<% = 1%>">首页</a>
<a Href="nesw2.asp?Page=<% =intCurPage -1 %>">上一页</a>
<%end if %>
<%if page<>rs.pagecount then %>
<a Href="nesw2.asp?Page=<% =intCurPage + 1%>">下一页</a>
<a Href="nesw2.asp?Page=<% = rs.PageCount%>">尾页</a>
<% end if %>
<hr>
<%
For i = 1 to rs.PageSize
if rs.eOF then
Exit For
end if
%>
<img src="images/pot.gif" width="17" height="13"> <font
class="p9-200"><%=rs("news_date")%></font> <a
href="disp.asp?recno=<%=rs("news_no")%>" target="news"><%=rs("news_title")%></a>
<br>
<%
next
%>
<hr>
</tr>
</table>
</center>
</body>
<script language="JavaScript">
function news()
{
window.open("temp.htm","news","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=2,left=2,width=500,height=500")
//window.open("1.htm","news","width=470,height=500");
}
</script>