PDA

Click to See Complete Forum and Search --> : Search Engine Problems


ajc
Sep 1st, 2000, 02:38 PM
One possible way to do this is in your code you will want to have a variable that holds how many records to display. Then when you show your first 20, loop through the records(if it is a recordset) and display only those with a looping count between 1 and 20. You will also want to have a variable that holds what page of the results you are on. When you hit the next button you can pass in the pagenumber variable in the querystring. Using this variable you multiply the display range by the page number. ex. If on the second page then the range would be between the limit and (pagenumber * limit) giving you a range of 20 - 40. Use this to test what records to display in the loop.

for i = 0 to count
if i >= 20 and i < 40 then
response.write("the result")
end if
next
Where the 20 and 40 are would be variable calculated using the page number. Then on your next and previous buttons you add or subtract 1 from the pagenumber variable in the querystring.

I hope this helps.