end if
else
NumRecord=0
NumPage=0
NoncePage=0
end if
%>
<table border="1" width="700" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
<tr>
<td width="71" bgcolor="#EBE9FE" align="center">学号</td>
<td width="78" bgcolor="#EBE9FE" align="center">姓名</td>
<td width="65" bgcolor="#EBE9FE" align="center">性别</td>
<td width="78" bgcolor="#EBE9FE" align="center">班级</td>
<td width="110" bgcolor="#EBE9FE" align="center">出生年月</td>
<td width="110" bgcolor="#EBE9FE" align="center">联系电话</td>
<td width="71" bgcolor="#EBE9FE" align="center">修改</td>
<td width="71" bgcolor="#EBE9FE" align="center">删除</td>
</tr>
<%if Not(rst.bof and rst.eof) then
rst.move (Cint(NoncePage)-1)*10,1
for i=1 to rst.pagesize
%>
<tr>
<td width="71" align="center"><%=rst("user_number")%></td>
<td width="78" align="center"><a href=xsxx.asp?id=<%=rst("id")%>><%=rst("user_name")%></a></td>
<td width="65" align="center"><%=rst("user_sex")%></td>
<td width="78" align="center"><%=rst("user_class")%></td>
<td width="110" align="center"><%=rst("user_time")%></td>
<td width="110" align="center"><%=rst("user_tel")%></td>
<td width="71" align="center"><a href=updataxx.asp?id=<%=rst("id")%>>修改</a></td>
<td width="71" align="center"><a href=deleta.asp?id=<%=rst("id")%>>删除</a></td>
</tr>
<% rst.movenext
if rst.eof then exit for
next
else
response.write "<tr><td colspan=13><marquee scrolldelay=120 behavior=alternate>没有找到任何记录!!!</marquee></td></tr>"
end if
rst.close
set rst=nothing
%>
</table>
</table>
</div>
<table width="748" border="0" align="center">
<tr>
<td height="17">
<div align="right">
<input type="hidden" name="page" value="<%=NoncePage%>">
<%
if NoncePage>1 then
response.write "|<a href=info-manager.asp?page=1>首 页</a>| |<a href=info-manager?page="&NoncePage-1&">上一页</a>| "
else
response.write "|首 页| |上一页| "
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
response.write "|<a href=info-manager?page="&NoncePage+1&">下一页</a>| |<a href=info-manager?page="&NumPage&">尾 页</a>|"
else
response.write "|下一页| |尾 页|"
end if
%>
页次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font>
共<font color="#0033CC"><%=NumRecord%></font>条记录 </div> </td>
</table>
</center>
</body>
</html>
代码中最后一部分是实现分页显示记录集。删除功能是由文件deleta.asp来实现的。其实现代码比较简单,通过查找相应的记录,然后删除数据库中的该数据记录即可。实现代码如下:
<