您现在的位置: 设计龙 >> 网络编程 >> asp教程 >> 正文

asp上一篇下一篇代码

Author:佚名 Link:本站原创 Hits: Update:2008-8-7 13:38:21
天极网摘 ViVi收藏夹 365Key 和讯网摘 POCO网摘
<TR>
                <TD vAlign=center align=center style="line-height:160%;">
    <p><%set rs2=server.CreateObject("adodb.recordset")
 sql2="select * from SW_article where channelid in (select channelid from SW_article where articleid="&request("articleid")&") and articleid is not null order by updatetime"
 rs2.open sql2,conn,1,1
 if not rs2.eof and not rs2.bof then
 
 do while not rs2.eof
 if cstr(rs2("articleid"))=cstr(request("articleid")) then
 %>
 <%
 rs2.moveprevious
 if not rs2.bof then
 %>
 <a href="showinfo.asp?articleid=<%=rs2("articleid")%>" class="a6"><font color="red">上一篇</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%
 rs2.move(2)
 if not rs2.eof then
 %>
 <a href="showinfo.asp?articleid=<%=rs2("articleid")%>" class="a6"><font color="red">下一篇</font></a>
 
 <%else
 %>
 <!--已到最后一条-->
 <%end if%>
 <%else
 %>
 <!--已到头条-->&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <%rs2.move(2)%><a href="showinfo.asp?articleid=<%=rs2("articleid")%>" class="a6"><font color="red">下一篇</font></a>
 <%
 end if%>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <%
 exit do
 end if
 rs2.movenext
 loop
 
 end if
 rs2.close
 set rs2=nothing
 %></p>
    </TD>
              </TR>

www.sjlong.com发布
   
  • 上一篇文章:
  • 下一篇文章:
  • [回到标题] [回到顶部]