<%@Idioma = "vBScript" codePage = "936"%>
<!
<htmlxmlns = "http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv = "content-type" content = "text/html; charset = gb2312"/>
<title> asp 分页程序 </title>
<styleType = "text/css">
<!-
.Style1 {font-size: 12px}
->
</style> </head>
<Body>
<p>
<tabelawidth = "186" altura = "39" borda = "1" CellPadding = "0" CellSpacing = "0">
<tr>
<Td> 姓名 </td>
<Td> 密码 </td>
</tr>
<%
setrs = server.createObject ("adodb.recordset")
Conn = "dbq ="+server.mappath ("zheng.mdb")+"; defaultDir =; driver = {MicrosoftAccessDriver (*. MDB)};"
SQL = "Selecione*FromUser"
Rs.opensql, Conn, 1,2
rs.pagesize = 6 '设置页面显示得页数
ifrequest ("página") <> "" então
epage = cint (solicitação ("página")))
IFEPAGE <1ThenePage = 1
IFEPAGE> RS.PAGECOUNTTHENEPAGE = RS.PAGECOUNT
outro
Epage = 1
endif
rs.absolutePage = Epage
fori = 0Tors.Pagesize-1
ifrs.bofors.eofthenexitfor
%> <tr>
<Td> <%= rs ("nome")%> </td>
<Td> <%= rs ("pass")%> </td>
</tr>
<%
rs.movenext
próximo
%>
</tabela>
<Divalign = "Left"> <Spanclass = "Style1">
<formmethod = "get" onsubMit = "" document.Location = "c.asp? Page = '+this.page.value; returnfalse;'">
<%ifePage = 1ThenResponse.write ("首页") elSerponse.write ("<ahref = 'c.asp? Page = 1'>" & "首页" & "</a>")%>
<%ifePage = 1ThenResponse.write ("上一页") elSerponse.write "<ahref = c.asp? Page =" & epage-1 & "> 上一页 </a>"%>
<%ifePage = rs.pagecountThenResponse.write ("下一页") elSerponse.write "<ahref = c.asp? Page =" & Epage+1 & "> 下一页 </a>"%>
<%ifePage = rs.pageCountThenResponse.write ("末页") elSerponse.write "<ahref = c.asp?
现在是第 <Fontcolor = "Red"> <%= Epage%> </font> 页一 有 有 <fontcolor = "vermelho"> <%= rs.pagecount%> </font> 页