| re: asp pagination
I am thinking in classic asp the solution for this could vary greatly.
I would recommend trying some things yourself first and posting here when you have specific problems.
I can tell you to start you will need to load your recordset or your array (whichever you use to collect the data from the database) into a Session variable. This way you can carry the entire collection forward through each page without re-query or worrying about placeholders.
Once in your session variable you simply need to set a results limit (50 per page) and loop through your recordset\array with a For Next loop using 50 as yoru upperbound, to print out each row of data.
A next link at the bottom should pass a querystring value for page=2, page=3 etc, so that you know for ALL page 2's you would start at record 51, page 3's at record 101, etc.
As far as determining your page numbers ahead of time so they can skip to any page, you simply have to divide your total results by your maximum results allowed.
Total/MaxAllowed = number of pages rounded down
Good enough to get you started?
|