ASP 内容分页代码。

来源:百度知道 编辑:UC知道 时间:2024/05/22 15:59:58
我现在想解决这样一个问题。
因为一些新闻文字过多,页面会比较长。我想让内容达到一定到数量就自动分页。
这个怎么实现啊。
我是菜鸟。
大家能不能给我一段代码 我让研究研究啊
谢谢大家了。

<%
page =int(Request.QueryString("page"))
set rs=server.createobject("adodb.recordset")
if session("tbyhm")<>"" or session("tbjb")="admin" then
exec="select * from info order by id desc"
rs.open exec,conn,1,1
rs.PageSize =30
If page < 1 Then page = 1
If page > rs.PageCount Then page = rs.PageCount
if not rs.eof then rs.AbsolutePage =page%>
<table width="100%" border="0" cellpadding="1" cellspacing="1" align="center">
<tr bgcolor="#CCD8E6">
<Td align="center" width="10%">序 号</Td>
<td align="center" width="29%">标 题</td>
<td align="center" width="10%">类 型</td>
<td align="center" width="20%&quo