[摘要]记录:"& PageBegin & " - " & PageEnd & " / " &RS.RecordCo...
记录:"& PageBegin & " - " & PageEnd & " / " &RS.RecordCount
%>
</TD>
<TD align=right>
<%
if PageNo > 1 Then
response.write "<a href=list.asp?PageNo=1>首页</a> <a href=list.asp?PageNo=" & (PageNo-1) & ">上页</a> "
end if
if TotalPages > 1 and cint(PageNo) <> cint(TotalPages) then
response.write "<a href=list.asp?PageNo=" & (PageNo+1) & ">下页</a> <a href=list.asp?PageNo=" & TotalPages & ">末页</a> "
end if
%>
</TD>
</TR>
<TR bgcolor=#003366 height=20px>
<TD align=center width=20%><font color=#FFFFFF>商品代码</font></TD>
<TD align=center width=30%><font color=#FFFFFF>商品名称</font></TD>
<TD align=center width=8%><font color=#FFFFFF>型号规格</font></TD>
<TD align=center width=8%><font color=#FFFFFF>计量单位</font></TD>
<TD align=center width=8%><font color=#FFFFFF>参考进价</font></TD>
<TD align=center width=8%><font color=#FFFFFF>参考售价</font></TD>
<TD align=center width=18%><font color=#FFFFFF>备注</font></TR>
<%
RowCount = RS.PageSize
dim color1,color2
color1="#dddddd"
color2="#eeeeee"
Do While Not RS.EOF and RowCount > 0
Response.Write "<TR height=20px bgcolor="
%>
<%
if RowCount mod 2=0 then:response.write color1 else:response.write color2
%>
<%
Response.Write ">"
%>
<TD><span><a href=manage.asp?id=<%=rs(0)%>><% =RS("vCode")%></a></span></td>
<TD><span><% =RS("vName")%></span></td>
<TD><span><% =RS("vSpec")%></span></TD>
<TD><span><% =RS("vUnit")%></span></td>
<TD><span><% =RS("fInPrice")%></span></td>
<TD><span><% =RS("fOutPrice")%></span></TD>
<TD><span><% =RS("vDescription")%></span></td>
</TR>
<%
RowCount = RowCount - 1
RS.MoveNext
Loop
Conn.Close
set RS = nothing
set Conn = nothing
%>
<TR bgcolor=#003366 height=20px>
<TD align=center width=20%><font color=#FFFFFF>商品代码</font></TD>
<TD align=center width=30%><font color=#FFFFFF>商品名称</font></TD>
<TD align=center width=8%><font color=#FFFFFF>型号规格</font></TD>
<TD align=center width=8%><font color=#FFFFFF>计量单位</font></TD>
<TD align=center width=8%><font color=#FFFFFF>参考进价</font></TD>
<TD align=center width=8%><font color=#FFFFFF>参考售价</font></TD>
<TD align=center width=18%><font color=#FFFFFF>备注</font>
</TR>
<TR>
<TD>
<%
For i=1 to TotalPages
if CInt(PageNo) = CInt(i) then
response.write "["&i&"]"
else
response.write " <a href=list.asp?PageNo="&i&">"&i&"</a> "
end if
Next
%>
</TD>
</TR>
</TABLE>
<%
End if
%>
关键词:ASP应用范例-分页_代码局部