%
If RS1.Rcordcount > 0 Then 'Record set is not empty and process records
RS1.pageSize = 10 'Set the number of records displayed per page
NUM = RS1.RCORDCOUNT 'Record Total
Pagenum = RS1.pageCount 'Total Number
Page = Request (PAGE) 'Get the original information of the page number
'The beginning of the original information of the processing page number!
If page <> then
Page = CINT (PAGE)
if err.number <> 0 then
err.clear
page = 1
end if
if page <1 then
page = 1
end if
else
page = 1
End if
if page*RS1.PAGESIZE > NUM and Not ((Page-1)*RS1.pageSize <num)
page = 1
end if
'The end of the original information of the processing page number! Set the current page number
RS1.absolutePage = Page
%>
<!-Determine whether the current page is the last page, and the duplicate display of the setting record of the setting settings->
<% If page <> pagenum then
lablenum = RS1.pageSize
else
lablenum = NUM- (Page-1)*RS1.PAGESIZE
end if
for i = 1 to lablenum
%>
<Trbgcolor =#FFFFFF>
<TD Height = 25> <div align = center> <%= (rs1.fields.item (ID). Value)%> </div> </td>
<TD> <DIV Align = Center> <%= (RS1.Fields.item (Name). Value)%> </div> </td>
<TD > <LIV Align = Center> <%= (RS1.Fields.item (address). Value)%> </div> </td>
<TD> <DIV Align = Center> <%= (RS1.Fields.item (Category). Value)%> </div> </td>
<TD> <DIV Align = Center> <%= (RS1.Fields.item (finally modified). Value)%> </div> </td>
<TD> <DIV Align = Center> <%= (RS1.Fields.item (modified person). Value)%> </div> </td>
</Tr>
%
RS1.movenext
next
%>
<!-The record of the current page is over, the following code is the record set link link code->
<Table width = 70% border = 0 align = center cellpadding = 0 cellspacing = 0>
<TR>
<Td height = 35>
<LIV Align = Right>
<Font color =#333333>
There are <%= num%> a link |
<A href = linkadmin.asp? Page = 1> Home </a> |
<%If page > 1 Then%> <a href = linkadmin.asp? Page = <%= page-1%>> <%end if%> Previous page </a> | |
<%If page <pagenum then%> <a href = linkadmin.asp? Page = <%= page 1%>> <%end IF%> Next page </a> | | | |
<A href = linkadmin.asp? Page = <%= Pagenum%>> Tail page </a> |
Page: <%= PAGE%>/<%= Pagenum%> Page |
<%= Pagenum%> page
</Font>
</Div>
</Td>
</Tr>
</Table>
<!-Record the linked coding code of the collection of pages, the record set is to execute the following code when it is empty->
<%Else%>
<Trbgcolor =#FFFFFF>
<TD Height = 25 COLSPAN = 6> <DIV Align = Center > < % Response.write (No results can be displayed!) %>
</Div> </td>
</Tr>
%
end if
RS1.Close ()
Set rs1 = nothing
%>