写了段代码,谁帮我改一下加个找不到数据的提示!
<table class="GaoTableBig"><tr>
<td align="center">
<%
if request("search_cl")="" and request("search_na")="" and request("search_co")="" and request("search_te")="" then
sql="select * from Gao_Guang order by px desc, id desc"
else
sql="select * from Gao_Guang where GaoClass<>'""' " & search & "order by px desc, id desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
rs.PageSize=16 '指示recordset中一页包含的记录数
PageCount=rs.PageCount '使用PageCount属性可确定Recordset对象中数据的页数
Page=Cint(request("Page"))
if Page<=0 then Page=1
if request("Page")="" then Page=1
rs.AbsolutePage=page '指定当前记录所在的页
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<% i=1
for j=1 to rs.PageSize
if not rs.eof then %>
<td class="GaoPhotoTD"><a href="show.asp?id=<%=rs("id")%>" target="_blank"><img src="<%=rs("Gaopic")%>" width="230" height="150" border="0"></a></td>
<% if (i mod 4)=0 then%>
<tr>
<% end if
else
exit for
end if
i=i+1
rs.movenext
next
%>
</tr>
</table>
<% if page=1 and not page=PageCount then%>
第一页|上一页| <a href="Index.asp?page=<%=page+1%>">下一页</a>| <a href="Index.asp?page=<%=PageCount%>">最后页</a>
<%elseif page<>1 and not page=PageCount then%>
<a href="Index.asp?page=1&search_qy=<%=search_qy%>&search_hy=<%=search_hy%>&search_co=<%=search_co%>&search_gw=<%=search_gw%>">第一页</a>|
<a href="Index.asp?page=<%=page-1%>">上一页</a>| <a href="Index.asp?page=<%=page+1%>">下一页</a>|
<a href="Index.asp?page=<%=PageCount%>">最后页</a>|
<%elseif page=PageCount then%>
<a href="Index.asp?page=1">第一页</a> <a href="Index.asp?page=<%=page-1%>">上一页</a>
下一页| 最后页
<%end if%>
</td>
</tr>
</table>
<%
rs.close
set rs=nothing
%>
[ 本帖最后由 wwlendy 于 2010-5-27 13:59 编辑 ]