我的分页显示总是显示不到这步
<% Else %>
<% If pages<rs.PageCount Then %>
<% typeID=Request.Querystring("id")%>
<td height="15" colspan="2">
<a href="Subpage.asp?id=<%=typeID%>&page=1">第一页</a>
<a href="Subpage.asp?id=<%=typeID%>&page=<%=(pages-1)%>">上一页</a>
<a href="Subpage.asp?id=<%=typeID%>&page=<%=(pages+1)%>">下一页</a>
<a href="Subpage.asp?id=<%=typeID%>&page=<%=(rs.PageCount)%>">最后一页</a> </td>
是什么原因呢!!
原代码是这样的!!嘛烦高手们帮手弄弄...
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr>
<td><div align="center"></div></td>
<td><div align="center"><a href="subpage.asp?id=1" target="_parent">时政</a></div></td>
<td><div align="center"><a href="subpage.asp?id=2" target="_parent">经济</a></div></td>
<td><div align="center"><a href="subpage.asp?id=3" target="_parent">军事</a></div></td>
<td><div align="center"><a href="subpage.asp?id=4" target="_parent">科教</a></div></td>
<td><div align="center"><a href="subpage.asp?id=5" target="_parent">法制</a></div></td>
<td><div align="center"><a href="subpage.asp?id=6" target="_parent">社会</a></div></td>
<td><div align="center"><a href="subpage.asp?id=7" target="_parent">体育</a></div></td>
<td><div align="center"><a href="subpage.asp?id=8" target="_parent">娱乐</a></div></td>
<td><div align="center"></div></td>
</tr>
</table></td>
</tr>
</table>
<%
select case cint(request.QueryString("id"))
case 1
table="时政要闻"
case 2
table="经济动向"
case 3
table="世界军事"
case 4
table="科学教育"
case 5
table="法治道德"
case 6
table="社会现象"
case 7
table="体育世界"
case 8
table="时尚娱乐"
end select
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
<tr>
<td><table width="100%" height="232" border="1" cellpadding="0" cellspacing="5" bordercolor="#000000" bordercolordark="#FFFFFF">
<tr>
<td height="20" bgcolor="#97D6FF"><%= table %></td>
</tr>
<tr>
<td height="195"><table width="100%" border="1" cellspacing="0" cellpadding="0">
<!--#include file="conn.asp"-->
<% rs.pagesize=2
pages=request.QueryString("page")
if pages="" then pages=1 end if
If Request.Form("id")="" Then
sql="Select * from tb_News where Style='"&table&"'"
Else
sql="Select * from tb_News where Style='"&table&"' and (Title like '%"&Request.Form("keyword")&"%' or Content like '%"&Request.Form("keyword")&"%' or Type like '%"&Request.Form("keyword")&"%')"
End If
rs.Open sql,conn,1,3
If Not rs.Eof Or Not rs.Bof Then
rs.Absolutepage=CInt(pages)
row=0
While Not rs.Eof And row<rs.Pagesize
%>
<tr>
<td width="37%"><%= rs("type") %></td>
<td width="63%"><%= rs("title") %></td>
</tr>
<%
rs.MoveNext
row=row+1
Wend
%>
<tr>
<td height="22" colspan="2"> </td>
</tr>
<% If pages=1 Then %>
<% If pages<>rs.PageCount Then %>
<tr>Z
<% typeid=Request.Querystring("id")%>
<td height="15" colspan="2"><a href="Subpage.asp?id=<%=typeID%>&page=<%=(pages+1)%>">下一页</a> <a href="Subpage.asp?id=<%=typeID%>&page=<%=(rs.PageCount)%>">最后一页</a> </td>
</tr>
<% End If %>
<tr>
<% Else %>
<% If pages<rs.PageCount Then %>
<% typeID=Request.Querystring("id")%>
<td height="15" colspan="2">
<a href="Subpage.asp?id=<%=typeID%>&page=1">第一页</a>
<a href="Subpage.asp?id=<%=typeID%>&page=<%=(pages-1)%>">上一页</a>
<a href="Subpage.asp?id=<%=typeID%>&page=<%=(pages+1)%>">下一页</a>
<a href="Subpage.asp?id=<%=typeID%>&page=<%=(rs.PageCount)%>">最后一页</a> </td>
</tr>
<% else %>
<tr>
<% typeID=Request.Querystring("id")%>
<td height="15" colspan="2"><a href="Subpage.asp?id=<%=typeID%>&page=1">第一页</a> <a href="Subpage.asp?id=<%=typeID%>&page=<%=(pages-1)%>">上一页</a> </td>
</tr>
</table></td>
</tr>
<% End If %>
<% End If %>
<% End If %>
</table></td>
</tr>
</table>
</body>
</html>