asp 分页问题
我的一个分页程序,absolutepage属性不能使用,所有的象cursorlocation,cursortype属性都设置好了,可是就是不能分页,不知是什么原因,还请大家帮忙。 问题点数:20、回复次数:5Top
1 楼flamboyance(我是程序员)回复于 2001-12-07 21:44:30 得分 0
数据库系统是什么?连库方式?Top
2 楼baggio785(狗狗)回复于 2001-12-07 21:48:46 得分 20
<%
dim nowpage
nowpage=Request.QueryString("nowpage")
if nowpage="" then nowpage=1
nowpage=CInt(nowpage)
%>
<%
sql="select nu_id,title,kind from nutrition order by nu_id desc"
rs.open sql,conn,3,4
rs.pagesize=10
if nowpage>rs.pagecount then
nowpage=rs.pagecount
end if
if nowpage<1 then
nowpage=1
end if
if not rs.eof then
%>
<%
for i=1 to rs.pagesize
if rs.eof then exit for
%>
<a href="nutrition_modify.asp?nu_id=<%=rs("nu_id")%>"><font size="2" color="red"><%=rs("title")%></font></a>
<%
rs.movenext
next
%>
<%
end if
%>
<form action="nutrition.asp" method="get" id="form2" name="form2">
<%if nowpage>1 then%>
<a href="nutrition.asp?nowpage=1">
<img src="../images/go_top.gif" width="13" height="15" border="0" alt="首页">
</a>
<a href="nutrition.asp?nowpage=<%=nowpage-1%>">
<img src="../images/go_prev.gif" width="13" height="15" border="0" alt="上页">
</a>
<%end if%>
<%if nowpage<rs.pagecount and nowpage>1 then%>
<a href="nutrition.asp?nowpage=<%=nowpage+1%>">
<img src="../images/go_next.gif" width="13" height="15" border="0" alt="后页">
</a>
<a href="nutrition.asp?nowpage=<%=rs.pagecount%>">
<img src="../images/go_end.gif" width="13" height="15" border="0" alt="尾页">
</a>
<input maxLength="3" size="2" name="nowpage" value=<%=nowpage%>>页
<input type="image" SRC="../images/go.gif" WIDTH="39" HEIGHT="19" id=image1 name=image1>
<%end if%>Top
3 楼bwi(奔奔小熊)回复于 2001-12-07 22:04:54 得分 0
是其他语句有问题,我以前也遇到过这个问题,也是报这个错误,其实最后把其他语句改了后,数据库网页就显示正常了,而且没有报错!Top
4 楼m_t_y(好古文,六艺经传皆通习之)回复于 2001-12-08 19:15:52 得分 0
bwi,你改的是什么语句啊,说给我可以吗,谢谢大家能给我的回复。Top
5 楼bwi(奔奔小熊)回复于 2001-12-08 22:16:53 得分 0
我的意思就是说你其他的语句有问题,这个问题出在哪儿也不一定。
你的程序是不是少个end if?Top




