效果 首页 上十 上一 1 2 3 4 5 6 7 8 9 10 下一 下十 尾页 转到___ 页数:1/25页 篇数:125
主文件 nclass.asp 包含文件 top.asp || bottom.asp || abbrword.asp || conn.asp
内容
---/-----------------------------------------------------------
nclass.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!--#include file="Connections/conn.asp" --> <% 'subject : ASP 分页技巧 'author : Stabx<shawl.qiu@gmail.com> 'blog : http://btbtd.exblog.jp/ / http://my.opera.com/btbtd/ 'blog name : Phoenix.GI - P.GI 'date : 2006-4-19
' rsn.PageCount / 总页数 ' pageview / 当前页数 Dim I '定义循环变量 Dim RPP 'RPP:指定每页显示的记录数, Dim pageview '翻页变量 I=1 '从 1 开始 RPP=50 '每页显示 50 条记录 pageview=CInt(Request("pageview")) '读取 URL 页号 Dim rsn '定义链接名 Set rsn = Server.CreateObject("ADODB.Recordset") '建立一个 rsn 数据库查询 rsn.ActiveConnection = MM_conn_STRING '这是 DW 的链接字符串 ' rsn 链接方式 rsn.Source = "SELECT * FROM article WHERE classid="&request.QueryString("classid")&" and nclassid="&request.QueryString("nclassid")&" OR [1] [2] [3] [4] [5] 下一页 |