Salve a tutti... volevo chiedervi un aiutino!! vorrei inserire questo tipo di paginazione:

<%
' Quanti record per pagina?
quanti = 5
pagina = CInt(Request.QueryString("p"))
If NOT IsNumeric(pagina) OR pagina < 1 Then pagina = 1

'-----------------------------------------------------

If NOT Rs.EOF Then
Rs.PageSize = quanti
Rs.AbsolutePage = pagina
i = 0

while i<quanti AND NOT Rs.EOF
i = i + 1
progressivo = quanti*(pagina-1)+i%>
<%
Rs.MoveNext
wend
Rs.movefirst
%>
<%
Dim tot, start, stop1
tot = Rs.PageCount
start = pagina - 5
stop1 = pagina + 5

If (start<1) Then stop1 = stop1 + (-start) + 1
If (stop1>tot) Then start = start - (stop1 - tot)
If (start<1) Then start = 1
If (stop1>tot) Then stop1 = tot

script = Request.ServerVariables("SCRIPT_NAME")

For i = start To stop1
If i <> pagina Then
Response.Write("[<a href=" & script & "?p=" & i & " & ")
Response.Write("<span style='font-size:10px; color:#000000; text-decoration: none;'>" & i & "</span>")
Response.Write("</a>]")
ElseIf start <> stop1 Then
Response.Write "(<span style='font-size:10px; color:#000000; text-decoration: none;'>" & i & "</span>)"
End If
Next

Rs.Close()
Set Rs = Nothing
End if
%>


nella pagina (codice) che posto qui di seguito... ma non riesco... qualcuno saprebbe darmi una mano?!?!


<html>

<head>
<meta http-equiv="Content-Language" content="it">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Elenco articoli</title>
<link rel="stylesheet" href="indexx.css">
</head>

<body>

<table width="750" height="727" border="0" align="center" cellpadding="0" cellspacing="8" id="AutoNumber1" style="border-collapse: collapse">
<tr>
<td height="50" colspan="3" align="center" bgcolor="#CCCCCC">



</td>
</tr>
<tr>
<td height="11" colspan="3"><div align="right"><a href="carrello.asp">
</a>[img]icons/cart.gif[/img]<a href="carrello.asp">guarda
il carrello
</a></div></td>
</tr>
<tr>
<td width="133" height="498" rowspan="3" valign="top">


</td>
<td width="484" height="425" align="center" valign="top"> <table width="100%" border=0 cellpadding=0 cellspacing=0>
<tr>
<td>
<%if len(Session("aperta")) > 0 then
idlineadicatalogo = Request.QueryString("idlineadicatalogo")
Session.LCID=1040
Set DatabaseWebStore = Server.CreateObject("ADODB.Connection")
DBString =""
DBString = DBString + "Driver={Microsoft Access Driver (*.mdb)};"
DBString = DBString + "Dbq=" & Server.MapPath(".") & "\db.mdb;"
DBString = DBString + "Uid=Admin;"
DBString = DBString + "Pwd=;"
DatabaseWebStore.Open DBString
If Len(idlineadicatalogo) = 0 Then%>
<%Else%>
<%
Dim sqlquery
sqlquery = "select "
sqlquery = sqlquery & "ID, "
sqlquery = sqlquery & "Codice, "
sqlquery = sqlquery & "Denominazione, "
sqlquery = sqlquery & "Informazioni, "
sqlquery = sqlquery & "InformazioniEstese, "
sqlquery = sqlquery & "Confezione, "
sqlquery = sqlquery & "Prezzo, "
sqlquery = sqlquery & "RiferimentoDiIcona, "
sqlquery = sqlquery & "RiferimentoDiFoto "
sqlquery = sqlquery & "from "
sqlquery = sqlquery & "[Catalogo, Articoli] "
sqlquery = sqlquery & "where "
sqlquery = sqlquery & "IDLinea = " & idlineadicatalogo & " "
sqlquery = sqlquery & " And "
sqlquery = sqlquery & "InVendita=true "
Dim RecordsetArticoli
Set RecordsetArticoli = DatabaseWebStore.Execute(sqlquery)
%>
<%
Dim ID
Dim Codice
Dim Denominazione
Dim Informazioni
Dim InformazioniEstese
Dim Confezione
Dim Prezzo
Dim RiferimentoDiIcona
Dim RiferimentoDiFoto
%>
<%If RecordsetArticoli.EOF Then%>
<%Else%>
<TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=6>
<%if err=0 then
While Not RecordsetArticoli.EOF%>
<%
ID = RecordsetArticoli("ID")
Codice = RecordsetArticoli("Codice")
Denominazione = RecordsetArticoli("Denominazione")
Informazioni = RecordsetArticoli("Informazioni")
InformazioniEstese = RecordsetArticoli("InformazioniEstese")
Confezione = RecordsetArticoli("Confezione")
Prezzo = RecordsetArticoli("Prezzo")
RiferimentoDiIcona = RecordsetArticoli("RiferimentoDiIcona")
RiferimentoDiFoto = RecordsetArticoli("RiferimentoDiFoto")
%>
<TR VALIGN="TOP">
<TD width="10%">
<%If RiferimentoDiIcona <> "" Then%>
<A HREF="scheda_articolo.asp?idarticolo=<%=ID%>"> [img]<%=RiferimentoDiIcona%>[/img]
</A>
<%else%>

<%End If%>
</TD>
<TD width="78%"> <A HREF="scheda_articolo.asp?idarticolo=<%=ID%>">
<%=Denominazione%> </A>
<%=Informazioni%>

Prezzo
&euro; <%=FormatNumber(Prezzo, 2, -1, 0, -1)%>
</TD>
<TD width="12%" valign=bottom> <A HREF="carrello.asp?idarticolo=<%=ID%>">
[img]icons/cart.gif[/img]
</A> </TD>
</TR>
<TR>
<TD colspan=3><hr></TD>
</TR>
<%RecordsetArticoli.MoveNext%>
<%Wend
end if%>
</TABLE>
<%End If%>
<%End If%>
<%
RecordsetArticoli.Close
Set RecordsetArticoli = Nothing
DatabaseWebStore.Close
Set DatabaseWebStore = Nothing
else%>
<H4><font size="1"><a href="elenco_linee.asp">La sessione è scaduta.
Torna all'Home Page</a></font></H4>
<%end if
%>
</TD>
</TR>
<TR>
<TD align=left> </TD>
</TR>
</table>
<table width="100%" border="0">
<tr>
<td> <div align="center">Torna al catalogo
| Guarda il carrello</div></td>
</tr>
</table></td>
<td width="149" height="498" rowspan="3" valign="top">

</td>
</tr>
<tr>
<td width="484" height="29" align="center"></td>
</tr>
<tr>
<td width="484" height="28"></td>
</tr>
<tr>
<td height="55" colspan="3" align="center"> </td>
</tr>
</table>

</body>

</html>