ciao!secondo voi dove'è che sbaglio in questa paginazione?
grazie:
<html>
<head>
<title>GESTIONE RECORD</title>
</head>
<body>
<%
RecordsPerPagina = 5
page = Request("page")
if page="" then page=1
' STRINGA SQL
strRicerca = Request("ricerca")
SQL = "SELECT * FROM listino WHERE prezzo LIKE '%" & strRicerca & "%'"
'apri recordset
' paginazione
rs.PageSize = RecordsPerPagina
rs.AbsolutePage = page
If rs.Eof=True or rs.Bof=True then
Response.Write "
Nessun risultato trovato</P>"
Else
For i=1 to RecordsPerPagina
if Not rs.EOF then
%>
<table>
<tr>
<td width="82" valign="middle" align="center" bgcolor="#FFFFCC" height="30">">[img]cancella.gif[/img]"></td>
<td width="31" valign="middle" align="center" bgcolor="#FFFFCC" height="30">">[img]modifica.gif[/img]"></td>
<td width="162" bgcolor="#FFFFCC" height="30"><font size="2" face="Verdana"><%=rs("prezzo")%></font></td>
<td width="164" bgcolor="#FFFFCC" height="30"><font size="2" face="Verdana"><%=rs("articolo")%></font></td>
<td width="165" bgcolor="#FFFFCC" height="30"><font size="2" face="Verdana"><%=rs("codice")%></font></td>
</tr>
</table>
<%
rs.MoveNext
end if
Next
End if
%>
<%
Response.Write "
Pagine: "
For pag=1 to rs.PageCount
Response.Write "<A href='index.asp?page=" & pag
Response.Write "&" & Server.UrlEncode(strRicerca)
Response.write "'>"
Response.Write pag
Response.Write "</A> "
Next
Response.Write "</P>"
%>
</body>
</html>

Rispondi quotando