Gets the data present in a database, putting 10 each page.
<%
RecordsPerPagina = 10
page = Request("page")
if page="" then page=1
strRicerca = Request("ricerca")
SQL = "SELECT * FROM Ricerca WHERE Descrizione LIKE '%" & strRicerca & "%'"
rs.PageSize = RecordsPerPagina
rs.AbsolutePage = page
If rs.Eof=True or rs.Bof=True then
Response.Write "<P>No result </P>"
Else For i=1 to RecordsPerPagina if Not rs.EOF then 'show records rs.MoveNext end if Next
End if
%>
Navigation bar
<%
Response.Write "<P><B>Pagine:</B> "
For pag=1 to rs.PageCount
Response.Write "<A href='pagina.asp?page=" & pag
Response.Write "&" & Server.UrlEncode(strRicerca)
Response.write "'>"
Response.Write pag
Response.Write "</A> "
Next
Response.Write "</P>"
%>