上一篇:
<%
set PrevRs=Server.CreateObject("ADODB.RecordSet")
PrevSql= "select * from Article where ArticleID<"&ArticleID&" order by ArticleID desc"
PrevRs.open PrevSql,conn,1,1
if not PrevRs.eof then
%>
<a href="/Article_Show.asp?ArticleID=<%=PrevRs("ArticleID")%>"><%=PrevRs("Title")%></a>
<%else%>
已经是第一篇了!
<%
end if
PrevRs.close
set PrevRs=nothing
%>
<br />
下一篇:
<%
set NextRs=Server.CreateObject("ADODB.RecordSet")
NextSql= "select * from Article where ArticleID>"&ArticleID&" order by ArticleID asc"
NextRs.open NextSql,conn,1,1
if not NextRs.eof then
%>
<a href="/Article_Show.asp?ArticleID=<%=NextRs("ArticleID")%>"><%=NextRs("Title")%></a>
<%else%>
已经是最后一篇了!
<%
end if
NextRs.close
set NextRs=nothing
%>