分页传值问题
<% id=Request.Querystring("id")
If id ="" then
Response.Write("<script language=javascript>alert('无ID值得');window.location.href='index.asp'</script>")
end if
if instr(id,"'") or instr(id,"select") or instr(id,"in") or instr(id,"from") or instr(id,"len") or instr(id,"where") or instr(id,"or") or instr(id,"and") then
Response.Write("<script language=javascript>alert('你想做什么?');window.location.href='index.asp'</script>")
Response.End
end if
%>
<table width="1001" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="5"></td>
</tr>
<tr>
<td>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" style="border: 1px solid #cccccc">
<tr>
<td>
<%
sql="select * from ly where id="&id
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
<table width="98%" border="0" align="center" cellpadding="10" cellspacing="3">
<tr>
<td width="80%" bgcolor="#DBE8EE"><div align="center">没有相关评论</div></td>
</tr>
</table>
<% else
rs.pagesize=2
currentpage=Clng(request("page"))
if currentpage<1 then currentpage=1
if currentpage>rs.pagecount then currentpage=rs.pagecount
rs.absolutepage=currentpage
do while not rs.eof
%>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="3">
<tr>
<td width="80%" bgcolor="#DBE8EE"> <%=rs("connect")%></td>
<td width="8%" bgcolor="#DBE8EE"> <%=rs("name1")%></td>
<td width="12%" bgcolor="#DBE8EE"> [<%=rs("date")%>]</td>
</tr>
</table>
<%
i=i+1
rs.MoveNext
If i>=rs.pagesize Then Exit Do
Loop
end if
%>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">共有<font color=red><%=rs.recordcount%></font>条 <a href="lys.asp?id=<%=rs("id")%>">首页 </a><a href="lys.asp?page=<%=currentpage-1%>&id=<%=rs("id")%>">上一页 </a><a href="lys.asp?page=<%=currentpage+1%>&id=<%=rs("id")%>">下一页 </a> <a href="lys.asp?page=<%=rs.pagecount%>&id=<%=rs("id")%>">尾页 </a>当前第<font color="#FF0000"><%=currentpage%>/<%=rs.pagecount%></font>页</div></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="5"> </td>
</tr>
</table>
当点下一页的时候成功 但是之后就无法得到ID值了