分页函数
函数如下:<%
private function fenye(rs, pagesize,args)
Dim intcur
Dim intpagesize
Dim total
Dim inttotal
args = split(args,",")
if Request.querystring("page")="" then
intcur=1
page = "first"
else
select case request("page")
case "first"
intcur=1
case "previous"
intcur=cint(request("curpage"))
intcur=intcur-1
case "next"
intcur=cint(request("curpage"))
intcur=intcur+1
case "last"
intcur=cint(request("lastpage"))
case else
intcur=request("page")
end select
end if
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" height="58">
<%
if rs.eof then
response.write "没有栏目:("
else
intpagesize=pagesize
rs.pagesize=intpagesize
if not rs.eof then
rs.AbsolutePage=intcur
end if
total=rs.recordcount
inttotal=rs.pagecount
Dim i
i = 0
%>
<table border = 1 align = center>
<tr>
<%
Dim n
n = 0
do while n <= UBound(args)%>
<th>
<%response.write args(n)%>
</th>
<%
n = n + 1
loop
%>
</tr>
<%
do while NOT rs.EOF and i<intpagesize%>
<tr>
<%
Dim l
l = 0
补充:asp教程,数据库相关