asp分页:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>管理员</title>
<style>
P {
COLOR: #000000; FONT-SIZE: 9pt; LINE-HEIGHT:12pt
}
A:hover {
COLOR: #ff00ff;text-decoration:none
}
A:link {
COLOR: #000000;text-decoration:none
}
A:visited {
COLOR:#000000;text-decoration:none
}
TD {
font-size:9pt
}
</style>
</head>
<body topmargin=1>
<div align="center">
<center>
<table border="0" width="755" cellspacing="0" cellpadding="0" height="60">
<tr>
<td width="307">
<p align="center"><a href="index.asp"><img border="0" src="index.jpg" width="300" height="60"></a></td>
<td width="444">
<p align="center"><img border="0" src="jpg/ico.gif"></td>
</tr>
</table>
</center>
</div>
<%
mypage=request.querystring("whichpage")
if mypage="" then
mypage=1
end if
if mypage=1 then
toppage=1
else
toppage=mypage-1
end if
nextpage=mypage+1
ps=5
mypagesize=request.querystring("pagesize")
if mypagesize="" then
mypagesize=ps
end if
set conn=server.createobject("adodb.connection")
connstr="dbq="+server.mappath("jpg/sj.mdb")+";defaultdir=;driver={microsoft access driver (*.mdb)};"
conn.open connstr
sql="select * from member"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rall=rs.recordcount 'all
rs.pagesize=mypagesize 'page
pageall=cint(rs.pagecount)
if not rs.eof then
rs.absolutepage=mypage 'now page
end if
if not rs.eof then
%>
<form name="mm" method="post" action="master2.asp">
<div align="center">
<center>
<table border="0" width="755" cellpadding="0">
<tr>
<td width="100%" colspan="5" style="border-bottom-style: ridge; border-bottom-width: 1" bgcolor="#FFECF5">
<p align="center">共找到<%=rall%>位会员,分<%=pageall%>页,每页<%=ps%>位,现在是第<%=mypage%>页,<a href="<%=scriptname%>?whichpage=1&pagesize=<%=ps%>">第1页</a>,<a href="<%=scriptname%>?whichpage=<%=toppage%>&pagesize=<%=ps%>">上一页</a>,<a href="<%=scriptname%>?whichpage=<%=nextpage%>&pagesize=<%=ps%>">下一页</a>,
到第
<select size="1" name="d1" onchange="location.href=this.options[this.selectedIndex].value">
<% for j=1 to pageall %>
<option value="<%=scriptname%>?whichpage=<%=j%>&pagesize=<%=mypagesize%>"><%=j%>
</option>
<%
next
%>
</select>
页</td>
</tr>
<tr>
<td width="10%" bgcolor="#FFECF5">
<p align="center"> </td>
<td width="10%" bgcolor="#FFECF5"> </td>
<td width="60%" bgcolor="#FFECF5">
<p align="center"> </td>
<td width="10%" bgcolor="#FFECF5"> </td>
<td width="10%" bgcolor="#FFECF5"> </td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table width="755" border="1" bgcolor="#FFECF5">
<tr>
<td>
<%
p=0
while not rs.eof and p<5
%>
<p align="left" style="margin-left: 5"> <input type="checkbox" name="C1" value="<%=rs("uname")%>">[<%=rs("ID")%>
<%
if rs("aspyn")="开通" then
response.write " ★☆★"
end if
%>]<input type=text size=10 value=<%=rs("uname")%>>
<font color="#FF0000">密码</font>:<input type=text size=10 value=<%=rs("pass")%>>,<font color="#FF0000">姓名</font>:<%=rs("name")%>
,<font color="#FF0000">邮编</font>:<%=rs("post")%>&nbsp; ,<font color="#0000FF">地址</font>:<%=rs("addr")%>&nbsp;
,<font color="#0000FF">信箱</font>:<%=rs("email")%>&nbsp; ,<font color="#0000FF">网名</font>:<%=rs("webname")%>&nbsp;
,<font color="#0000FF">网址</font>:<a href="<%=rs("weburl")%>" target="_blank"><%=rs("weburl")%></a>&nbsp;
,<font color="#0000FF">免费空间</font>:<%=rs("aspyn")%> ,<font color="#0000FF">备注-fid</font>:<%=rs("fid")%>&nbsp; ,<font color="#0000FF"><br>加入时间</font>:<%=rs("times")%>&nbsp;
,<font color="#0000FF">说明</font>:<%=rs("message")%></p>
<%
rs.movenext
p=p+1
wend
else
response.write"没有记录!"
end if
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
</td>
</tr>
</table>
</center>
</div>
<p align="center"><input type="submit" value="删除用户" name="b">&nbsp;&nbsp;&nbsp;
<input type="submit" value="开通网站" name="b">
(只选1个)
</form>
</body>
</html>