Esta é a lista de paginação ASP para gerar páginas estáticas e obter o script ASP Applet
A cópia do código é a seguinte:
<!-#incluirfile = "Conn.asp"->
<html> <head> <title> Teste de paginação </ititle> <linkhref = "inc/style.css" type = text/cssSrel = stylesheet> </ad Head>
<%strhead = strhead & "<html>"
strhead = strhead & "<head>"
STRHEAD = STRHEAD & "<TITLE> TESTE DE PAGINAÇÃO </ititle>"
strhead = strhead & "<linkhref =" "inc/style.css" "type = text/cssrel = stylesheet>"
STRHEAD = STRHEAD & "</SHEFT>"
%>
<%
SQL = "Selecione*FromNews"
setrs = server.createObject ("adodb.recordset")
Rs.opensql, Conn, 1,1
%> <%
rs.pagesize = 2
TotalPage = Rs.Pagecount
rs.close
setrs = nada
forj = 1ToTotalPage
SQL = "Selecione*FromNews"
setrs = server.createObject ("adodb.recordset")
Rs.opensql, Conn, 1,1
qualPage = j
rs.pagesize = 2
TotalPage = Rs.Pagecount
rs.absolutePage = qualPage
HowManyRecs = 0
%> <%
str0 = ""
STR0 = STR0 & "</p>"
STR0 = STR0 & "<TABLEBGCOLOR =#CECFCEALIGN = Centerborder = 0Width = 800CellPadding = 2CellPacing = 1>"
%> <%
Dowhilenotrs.eofandHowManyRecs <rs.pagesize
%> <%
str0 = str0 & "<trbgcolor =#f7f7f7>"
str0 = str0 & "<tdbgcolor =#f7f7f7align =" "center" ">" & rs (0) & "</td>"
str0 = str0 & "<tdbgcolor =#f7f7f7align =" "center" ">" & rs (1) & "</td>"
str0 = str0 & "<tdbgcolor =#f7f7f7align =" "center" ">" & rs (2) & "</td>"
str0 = str0 & "<tdbgcolor =#f7f7f7align =" "center" ">" & rs (3) & "</td>"
STR0 = STR0 & "</tr>"
%> <%
rs.movenext
HowManyRecs = HowManyRecs+1
laço
rs.close
setrs = nada
%> <%str0 = str0 & "</ table>"
%> <%
Seção de paginação
ref = "" "
Ref = Ref & "<br>"
ref = ref & "<tabelabgcolor =#cecfCealign = centerborder = 0Width = 800CellPadding = 0Cellspacing = 1>"
ref = ref & "<trbgcolor =#f7f7f7>"
ref = ref & "<td>"
Ref = Ref & "<b> páginas:" & J & "/" & TotalPage & "</b>"
ref = ref & "</td>"
ref = ref & "<td>"
ref = ref & "<ahref = list_1.html" & ">" & "<fontface = webdings> 9 </font>" & "</a>" "
se qualPage = 1THEN
ref = ref & "<fontface = webdings> 7 </font>"