向高手求教ASP翻页的问题
请各位高手帮小弟查一下原因,第一页显示正常,点下一页或选择转到哪一页,就出现文章正文内容,而不是象第一页界面格式一样显示dim PerPage,page
page = request("page")
if page <>"" and IsNumeric(page) = false then
Response.Write("<script>alert('Sorry!\n\分页参数错误!');window.history.back();</script>")
response.End()
Call DBConnEnd()
end if
rs.open sql,conn,1,1
PerPage=14
'假如没有数据时
'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
text="0123456789"
rs.PageSize=PerPage
for i=1 to len(page)
checkpage=instr(1,text,mid(page,i,1))
if checkpage=0 then
exit for
end if
next
If checkpage<>0 then
If NOT IsEmpty(page) Then
CurrentPage=Cint(page)
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > rs.PageCount Then CurrentPage = rs.PageCount
Else
CurrentPage= 1
End If
If not rs.eof Then rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
%>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><%i=0
do while not rs.eof%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30" height="30" align="center"><img src="img/item_13.gif" width="7" height="9"></td>
<td height="25" align="left"> <a href="newsinfo.asp?id=<%=rs("id")%>"><%=cutstr(rs("title"),40)%></a></td>
<td width="100" align="right">[<%=FormatDateTime(rs("UpdateTime"),vbShortDate)%>]</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" background="img/shixian1.jpg"></td>
</tr>
</table>
<%i=i+1
rs.movenext
if i=PerPage then
exit do
end if
loop
%> </td>
</tr>
<tr>
<td height="30" align="right"><%
if rs.PageCount>1 then
Response.write "<font color='#000000'>-> 全部-共</font>"
Response.write "</font>" & "<font color=#FF0000>" & Cstr(rs.RecordCount) & "</font>" & "<font color='#000000'>条信息</font> "
Response.write "<font color='#000000'>第</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) & "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "页</font> "& PerPage &"条/页 "
If currentpage > 1 Then
response.write "<a href='?big="&big&"&page="+cstr(1)+"'><font color='#000000'>首页</font></a><font color='#ffffff'> </font>"
Response.write "<a href='?big="&big&"&page="+Cstr(currentpage-1)+"'><font color='#000000'>上一页</font></a><font color='#ffffff'> </font>"
Else
Response.write "<font color='#000000'>上一页 </font>"
End if
If currentpage < rs.PageCount Then
Response.write "<a href='?big="&big&"&page="+Cstr(currentPage+1)+"'><font color='#000000'>下一页</font></a><font color='#ffffff'> </font>"
Response.write "<a href='?big="&big&"&page="+Cstr(rs.PageCount)+"'><font color='#000000'>尾页</font></a> "
Else
Response.write ""
Response.write "<font color='#000000'>下一页</font> "
End if
response.write "<font color='#000000' >转到:</font>"
response.write ("<select name=""select"" style='font-size: 9pt;' onChange=""window.location=this.value""><option value=1 checked>请选择</option>")
for i=1 to rs.PageCount
response.write("<option value=""?big="&big&"&page="&i&""">第"&i&"页</option>")
next
response.write("</select>")
end if
rs.close
%></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</tbody>
</table>
<% end sub:sub pic() %>
<table width="100%" border="0" cellpadding="15" cellspacing="0">
<tr>
<td><table width="100%" height="220" border="0" cellpadding="0" cellspacing="0">
<tr>
<% sql = "select id,title,wfile,Content from main where BigClassName='"&big&"'"
if small<>"" then
sql=sql&" and SmallClassName='"&small&"'"
end if
sql=sql&" order by Id desc"