实现上一篇和下篇ASP代码
<%rs.closeset rs=server.createobject("adodb.recordset")
sql="select * from news where id="&request("id")-1
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
<span class="STYLE10">上篇文章:</span>已经没有了
<%else%>
<br>
<span class="STYLE10">上篇文章:</span><a href="shownews.asp?id=<%=rs("id")%>"><%=rs("title")%></a>
<%end if%>
<BR>
<% rs.close
set rs=server.createobject("adodb.recordset")
sql="select * from news where id="&request("id")+1
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
<span class="STYLE10">下篇文章:</span>已经没有了
<%else%>
<span class="STYLE10">下篇文章:</span><a href="shownews.asp?id=<%=rs("id")%>"><%=rs("title")%></a>
<%end if%>