Это список пейджнга ASP для создания статических страниц и получения скрипта апплета ASP
Кода -копия выглядит следующим образом:
<!-#includefile = "conn.asp"->
<html> <head> <Title> Тест на страницу </title> <linkhref = "inc/style.css" type = text/cssrel = styleSheet> </head>
<%strhead = strhead & "<html>"
strhead = strhead & "<head>"
strhead = strhead & "<Title> Тест на страницу </title>"
strhead = strhead & "<linkhref =" "Inc/style.css" "type = text/cssrel = stylesheet>"
strhead = strhead & "</head>"
%>
<%
sql = "select*fromNews"
setrs = server.createObject ("adodb.recordset")
Rs.opensql, Conn, 1,1
%> <%
rs.pearsize = 2
TotalPage = Rs.PageCount
Rs.close
setrs = ничего
forj = 1tototalpage
sql = "select*fromNews"
setrs = server.createObject ("adodb.recordset")
Rs.opensql, Conn, 1,1
Какая страница = j
rs.pearsize = 2
TotalPage = Rs.PageCount
rs.absolutepage = Какая страница
Howmanyrecs = 0
%> <%
str0 = ""
str0 = str0 & "</p>"
str0 = str0 & "<tablebgcolor =#cecfcealign = centerborder = 0width = 800cellpadding = 2cellpacing = 1>"
%> <%
dowhilenotrs.eofandhowmanyrecs <rs.pearsize
%> <%
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
петля
Rs.close
setrs = ничего
%> <%str0 = str0 & "</table>"
%> <%
Секция страниц
ref = ""
ref = ref & "<br>"
ref = ref & "<tablebgcolor =#cecfcealign = centerborder = 0width = 800cellpadding = 0cellspacing = 1>"
ref = ref & "<trbgcolor =#f7f7f7>"
ref = ref & "<td>"
ref = ref & "<b> страницы:" & j & "/" & totalPage & "</b>"
ref = ref & "</td>"
ref = ref & "<td>"
ref = ref & "<ahref = list_1.html" & ">" & "<fontface = webdings> 9 </font>" & "</a>" ""
Если какая страница = 1then
ref = ref & "<fontface = webdings> 7 </font>"