你是要做新闻列表吧
我这里有我做的一个列表
你拿过去看下
看能不能有帮助
<% @language="vbscript" %>
<% Response.Expires=-1 %>
<% Response.Buffer=true %>
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/function.asp"-->
<html>
<head>
<title>新闻列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../inc/default.css" rel="stylesheet" type="text/css">
<script language="javascript">
function changeCatalog(){
window.location="newslist.asp?catalogid="+catalog.value;
}
</script>
</head>
<body>
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="36%" height="16" align="center"><strong>
<%catalogid=CInt(Request("catalogid"))%>
选择栏目:<%=showCatalogTree(catalogid)%>
</strong></td>
<td width="36%"> </td>
<td width="28%"><a href="addnews.asp?catalogid=<%=catalogid%>"><strong>添加新闻</strong></a>
<a href="addnews_img.asp?catalogid=<%=catalogid%>"><strong>添加有图片的新闻</strong></a>
</td>
</tr>
</table>
<hr size="1" noshade>
<%
sql="select a.*,b.name catalog from newsinfo a,catalog b where a.catalogid=b.id"
If catalogid<>0 Then
sql=sql&" and a.catalogid="&catalogid
End If
sql=sql&" order by a.pubtime desc"
Set Rs=GetRecordSet(sql)
If Rs.Eof Then
response.write "<div align='center'><font color='red'>目前没有新闻</font></div>"
Else
Page=1 ' 设置变量PAGE=1
Rs.PageSize = 20 '每页显示记录数
If Not IsEmpty(Request("Page")) then '如果PAGE已经初始化...
Page = CInt(Request("Page")) '接收PAGE并化为数字型赋给PAGE变量
End If
If Page > Rs.PageCount then '如果接收的页数大于总页数
Page = Rs.PageCount '设置当前显示页等于最后页
End If
If Page <= 0 then '如果page小于等于0
Page = 1 '设置PAGE等于第一页
End If
Rs.AbsolutePage = Page '如果大于零,显示当前页等于接收的页数
%>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
<tr align="center" bgcolor="#CCCCCC">
<td width="26%" height="23"><strong>发布时间</strong></td>
<td width="38%" height="23"><strong>新闻标题</strong></td>
<td width="17%" height="23"><strong>栏目</strong></td>
<td width="19%" height="23"><strong>操作</strong></td>
</tr>
<%
i=0
While Not Rs.Eof And i<Rs.PageSize
%>
<tr bgcolor="#FFFFFF">
<td height="23"><%=Rs("pubtime")%></td>
<td height="23"><%=Rs("title")%></td>
<td height="23" align="center"><%=Rs("catalog")%></td>
<td height="23" align="center"><a href="modifynews.asp?catalogid=<%=catalogid%>&id=<%=Rs("id")%>">修改
</a><a href="newsdelete.asp?catalogid=<%=catalogid%>&id=<%=Rs("id")%>">删除</a></td>
</tr>
<%
Rs.MoveNext
i=i+1
Wend
%>
</table>
<table width="70%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center">
<td height="23"><strong><a Href="newslist.asp?catalogid=<%=catalogid%>&Page=<%=1%>">首页</a></strong></td>
<td height="23"><strong><a Href="newslist.asp?catalogid=<%=catalogid%>&Page=<%=Page-1%>">上一页</a></strong></td>
<td height="23"><strong><a Href="newslist.asp?catalogid=<%=catalogid%>&Page=<%=Page+1%>">下一页</a></strong></td>
<td height="23"><strong><a Href="newslist.asp?catalogid=<%=catalogid%>&Page=<%=Rs.PageCount%>">尾页</a></strong></td>
<td height="23"><strong>共<%=Rs.RecordCount%>条记录 每页<%=Rs.PageSize%>条 共<%=Rs.PageCount%>页 当前<%=Page%>页</strong></td>
</tr>
</table>
<%
End If
%>
</body>
</html>