Ho provato ad implementare la paginazione così:
codice:
<div class="list">
<ul id="fotogallery">
<%
quanti = 54
pag = Request.QueryString("pag")
If IsNumeric(pag) = False Or pag < 1 Then pag = 1
contatore = 0
Dim objFso, objFolder, objFiles
Dim strFolder, strFile, strPath, strExt
strPath = "gallery/"
strExt = ".JPG"
Set objFso = Server.createObject("Scripting.FileSystemObject")
Set objFolder = objFso.GetFolder(Server.MapPath(strPath))
Set objFiles = objFolder.Files
set custRs = Server.CreateObject("ADODB.Recordset")
custRs.Fields.Append "nome", 200, 300 ' adVarChar
custRs.Fields.Append "data", 7 ' Date
custRs.Open
For Each strFile in objFiles
custRs.AddNew
custRs("nome") = strFile.name
custRs("data") = strFile.DateCreated
Next
rs.PageSize = quanti
custRs.AbsolutePage = pag
While custRs.EOF = False And contatore < quanti
custRs.Sort = "data DESC"
Do until custRs.eof
if Right(lcase(custRs("nome")), Len(strExt)) = lcase(strExt) then
%>
[*]">[img]square.aspx?img=<%=strPath%><%=custRs([/img]&opx=80" border="0"> 
<%
custRs.movenext
contatore = contatore + 1
wend
Loop
Set objFso = Nothing
Set objFolder = Nothing
Set objFiles = Nothing
custRs.Close
set custRs = Nothing
%>[/list]
</div>
<p align="center">
<%If pag > 1 Then%>
Indietro
<%End If%>
<%
Dim x
x = 1
For x = 1 To rs.PageCount
If CInt(pag) <> x Then
%>
[<%=x%>]
<%
Else
%>
[<%=x%>]
<%
End If
Next
%>
<%If rs.EOF = False Then%>
Avanti
<%End If%>
</p>
Ma ho questo errore:
codice:
Microsoft VBScript compilation error '800a0400'
Expected statement
/gallery.asp, line 119
wend
^
Potete aiutarmi?
Grazie
G.