<table width="100%" border="0" cellpadding="0" cellspacing="0">
<%page=request.QueryString("page")
if not isempty(page) then
PageCount=cint(page)
else
PageCount=1
end if
n=1
exec="select * from Products where CID=5 order by ID desc"
set rs=server.CreateObject("adodb.recordset")
rs.PageSize=20
rs.open exec,conn,1,1
filename="motif.asp"
if rs.RecordCount<=0 then
%>
<tr><td class="llpj" height="300" valign="top">暂无相关信息</td></tr>
<% else
rs.AbsolutePage=PageCount
do while not rs.eof
%>
<%For i = 1 to rs.PageSize
if rs.EOF then
Exit For
end if
if (i mod 4)=1 then
%>
<tr><td width="25%">
<table width="160" cellspacing="0" cellpadding="0" border="0" class="mp">
<tr valign="bottom" height="160"><td align="center">
<a href="product_series_content.asp?id=<%=rs("id")%>">
<img src="<%=rs("ProImage")%>" border="0"/></a>
</td></tr></table></td>
<%else
if (i mod 4)=0 then
%>
<td width="25%">
<table width="160" cellspacing="0" cellpadding="0" border="0" class="mp">
<tr valign="bottom" height="160"><td align="center">
<a href="product_series_content.asp?id=<%=rs("id")%>">
<img src="<%=rs("ProImage")%>" border="0"/></a>
</td></tr></table></td></tr>
<tr><td colspan="4"> </td></tr>
<%else%>
<td width="25%">
<table width="160" cellspacing="0" cellpadding="0" border="0" class="mp">
<tr valign="bottom" height="160"><td align="center">
<a href="product_series_content.asp?id=<%=rs("id")%>">
<img src="<%=rs("ProImage")%>" border="0"/></a>
</td></tr></table></td>
<%end if
end if
rs.movenext
next %>
<%
rs.movenext
n=n+1
if n>rs.PageSize then exit do
loop
end if
%>
<tr>
<td style="padding-top:10px;" colspan="4">
<!-- #Include File="Include/SplitPage.Asp" -->
</td></tr>
<%rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</table>作者: 冰rose冰 时间: 2010-1-11 01:07
那是因为你没把分页查询的条件带到下一页