谁帮下我asp分页显示记录
<%'查询C_NEW数据库打开Setrsnew=Server.CreateObject("ADODB.Recordset")sqlnew="select*fromc_ne...
<%'查询C_NEW数据库打开
Set rsnew = Server.CreateObject ("ADODB.Recordset")
sqlnew="select * from c_news where daleibie='"& daleibie1 & "'"
rsnew.Open sqlnew,conn,1,1
%>
帮写个分页的或者给我说下怎么做 展开
Set rsnew = Server.CreateObject ("ADODB.Recordset")
sqlnew="select * from c_news where daleibie='"& daleibie1 & "'"
rsnew.Open sqlnew,conn,1,1
%>
帮写个分页的或者给我说下怎么做 展开
1个回答
2006-10-10
展开全部
<%'查询C_NEW数据库打开
Set rsnew = Server.CreateObject ("ADODB.Recordset")
sqlnew="select * from c_news where daleibie='"& daleibie1 & "'"
rsnew.Open sqlnew,conn,1,1
rsnew .pagesize=15
pagecount=rsnew .pagecount
page=int(request.QueryString ("page"))
if page<=0 then page=1
if request.QueryString("page")="" then page=1
rsnew .absolutepage=page
row=rsnew .pagesize
if page>pagecount then
response.Write "<script language=javascript>alert('对不起!没有你找的页面');history.back(-1);</script>"
response.End()
end if
%>
<%do while not new_rs.eof and row>0%>
<%=rsnew("字段名")%>
<%
row=row-1
new_rs.movenext
loop
%>
Set rsnew = Server.CreateObject ("ADODB.Recordset")
sqlnew="select * from c_news where daleibie='"& daleibie1 & "'"
rsnew.Open sqlnew,conn,1,1
rsnew .pagesize=15
pagecount=rsnew .pagecount
page=int(request.QueryString ("page"))
if page<=0 then page=1
if request.QueryString("page")="" then page=1
rsnew .absolutepage=page
row=rsnew .pagesize
if page>pagecount then
response.Write "<script language=javascript>alert('对不起!没有你找的页面');history.back(-1);</script>"
response.End()
end if
%>
<%do while not new_rs.eof and row>0%>
<%=rsnew("字段名")%>
<%
row=row-1
new_rs.movenext
loop
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询