Array question

Results 1 to 2 of 2

Thread: Array question

  1. #1
    Join Date
    Dec 1969

    Default Array question

    I have a large 2d array I need to output to the screen in 50 row chunks with a link at the bottom of the page to see the next 50. I currently am outputing the whole array but it is often too large and takes a long time to display. I need the somehow loop through the array output 50 rows at a time keeping track of the last page and dynamically build the next 50 link. How can I do this?

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, category Arrays

    Look at the question about arrays held in Session variables.<BR><BR>So just add another session variable to keep track of where you are, and presto.<BR><BR>Or, better, put a "menu" at the bottom of the page that allows the user to directly pick any "page" of 50 rows.<BR><BR>Or or or...<BR><BR>This is just a combination of recordset paging techniques and storing arrays techniques.<BR><BR>Fair warning: Storing that much data in Session variables is *NOT* advisable on any moderately busy site. Assuming the data came from a DB, it is usually better to do the paging in the DB, instead of in VBScript.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts