学着分了好多次都出错误,看论坛看得头都大了也分不出来,求大家帮我做下分页显示的代码,谢谢!
<!--#include file="conn.asp" -->
<html>
<title>管理界面</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#C0C0C0" text="#000000" topmargin="20" class="title">
<table border=1 align=center cellspacing=0 cellpadding=2 id="table1">
<%
dim sql
dim rs
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("wangba.mdb")
Conn.Open
set rs=server.createobject("adodb.recordset")
sql="select * from wangba order by address desc"
rs.Open sql,conn,1,1
if rs.EOF or rs.BOF then
Response.Write "<P>数据库中暂无资料!"
else
%>
<A HREF="add.asp">新添加</A>
<hr>
<tr>
<td width="60" height="28" bordercolorlight="#000000" bordercolor="#000000"><div align="center">区域
</div></td>
<td width="120" bordercolorlight="#000000" bordercolor="#000000"><div align="center">名字</div></td>
<td width="62" bordercolorlight="#000000" bordercolor="#000000"><div align="center">联系人</div></td>
<td width="90" bordercolorlight="#000000" bordercolor="#000000"><div align="center">电话</div></td>
<td width="254" bordercolorlight="#000000" bordercolor="#000000"><div align="center">地址</div></td>
<td width="36" bordercolorlight="#000000" bordercolor="#000000"><div align="center">编辑</div></td>
<td width="38" bordercolorlight="#000000" bordercolor="#000000"><div align="center">删除</div></td>
</tr>
<%
do while not rs.EOF
area=rs("area")
name=rs("name")
caller=rs("caller")
phone=rs("phone")
address=rs("address")
%>
<tr>
<td width="60" height="20" bordercolorlight="#000000" bordercolor="#000000"><div align="center"><%=area%
></a></div></td>
<td width="120" bordercolorlight="#000000" bordercolor="#000000"><div align="center"><a href="view.asp?
name=<%=name%>"><%=name%></div></td>
<td width="62" bordercolorlight="#000000" bordercolor="#000000"><div align="center"><%=caller%
></div></td>
<td width="90" bordercolorlight="#000000" bordercolor="#000000"><div align="center"><%=phone%></div></td>
<td width="254" bordercolorlight="#000000" bordercolor="#000000"><div align="center"><%=address%
></div></td>
<td width="36" bordercolorlight="#000000" bordercolor="#000000"><div align="center"><a href="modify.asp?
name=<%=name%>">编辑</a></div></td>
<td width="38" bordercolorlight="#000000" bordercolor="#000000"><div align="center"><a href="delnew.asp?
name=<%=name%>">删除</a></div></td>
</tr>
<% rs.MoveNext
loop
end if
rs.Close
set rs=nothing
conn.Close
set conn=nothing
%>
</td></table>
</body>
</html>
<%end if%>