separate list in pages x

Discussion in 'ASP General' started by Bart Plessers \(artabel\), Sep 9, 2003.

  1. Hello,

    I am developping a web-based file browser.
    Everything so far so good right now.

    To make the userinterface more conveniant, I want to split my file list in
    pages.
    with
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    Set oFolder = oFSO.GetFolder(CurrentPATH)
    Set oFolderContents = oFolder.Files
    For Each oFileItem in oFolder.Files
    (...)
    Next


    I get a list of all my files in oFolderContents.
    Is there a easy way to

    -split the whole list up in pages of i.e. 20 files
    -show general info (i.e. xxx files in folder, listing 20 files on page y/z)
    -let the user have the possibility to call the page with index i, where i
    stands for the i-th file on the list


    any good links out there?

    tia

    bartp





    --
    HyperART
    Paul Van Ostaijenlaan 4
    3001 Heverlee
    Bart Plessers \(artabel\), Sep 9, 2003
    #1
    1. Advertising

  2. Bart Plessers \(artabel\)

    chris lynn Guest

    I ran into the same problem with recordset displaying only
    x amount of records. I was surprised to see so little on
    this, and so many times I've seen it in websites. a few of
    the responses suggested putting the data into temp table
    and then using that to your advantage. I created some code
    that used the recordset.move method (i.e. rs5.Move(page))
    to accomplish this. I'm not sure how to do this cleanly
    with files. The temp table suggestion might be the only
    way. Our maybe an array and pass it to the same asp page.

    I can show you want I did for recordset data. It's simple
    and works. I use SQL Server 2K. Just e-mail me.

    Christopher


    >-----Original Message-----
    >Hello,
    >
    >I am developping a web-based file browser.
    >Everything so far so good right now.
    >
    >To make the userinterface more conveniant, I want to

    split my file list in
    >pages.
    >with
    > Set oFSO = CreateObject("Scripting.FileSystemObject")
    > Set oFolder = oFSO.GetFolder(CurrentPATH)
    > Set oFolderContents = oFolder.Files
    > For Each oFileItem in oFolder.Files
    > (...)
    > Next
    >
    >
    >I get a list of all my files in oFolderContents.
    >Is there a easy way to
    >
    >-split the whole list up in pages of i.e. 20 files
    >-show general info (i.e. xxx files in folder, listing 20

    files on page y/z)
    >-let the user have the possibility to call the page with

    index i, where i
    >stands for the i-th file on the list
    >
    >
    >any good links out there?
    >
    >tia
    >
    >bartp
    >
    >
    >
    >
    >
    >--
    >HyperART
    >Paul Van Ostaijenlaan 4
    >3001 Heverlee
    >
    >
    >
    >.
    >
    chris lynn, Sep 14, 2003
    #2
    1. Advertising

  3. I was also suprised on the lack of response on this issue.
    Anyway,
    the way I am doing it right now is building a 2dim array a_files(i,j) where
    i stands for the file attributes (name, path, date, size, ...) and j is the
    number of the file in the array

    then -depending on page size, i.e. each page contains 5x3 files = 15 files -
    I calculate the page number of the file.
    browsing with next and previous page can be done


    thanx for response

    bart

    ps
    Please send me your code. Probably I can learn of your design.

    --

    ==========================================
    Hyper A.R.T.
    bart plessers
    Paul Van Ostaijenlaan 4
    3001 Heverlee
    BELGIUM
    tel: +32 (16) 23.40.85
    fax: +32 (16) 23.41.06
    ==========================================





    "chris lynn" <> wrote in message
    news:032d01c37a60$1c6424c0$...
    > I ran into the same problem with recordset displaying only
    > x amount of records. I was surprised to see so little on
    > this, and so many times I've seen it in websites. a few of
    > the responses suggested putting the data into temp table
    > and then using that to your advantage. I created some code
    > that used the recordset.move method (i.e. rs5.Move(page))
    > to accomplish this. I'm not sure how to do this cleanly
    > with files. The temp table suggestion might be the only
    > way. Our maybe an array and pass it to the same asp page.
    >
    > I can show you want I did for recordset data. It's simple
    > and works. I use SQL Server 2K. Just e-mail me.
    >
    > Christopher
    >
    >
    > >-----Original Message-----
    > >Hello,
    > >
    > >I am developping a web-based file browser.
    > >Everything so far so good right now.
    > >
    > >To make the userinterface more conveniant, I want to

    > split my file list in
    > >pages.
    > >with
    > > Set oFSO = CreateObject("Scripting.FileSystemObject")
    > > Set oFolder = oFSO.GetFolder(CurrentPATH)
    > > Set oFolderContents = oFolder.Files
    > > For Each oFileItem in oFolder.Files
    > > (...)
    > > Next
    > >
    > >
    > >I get a list of all my files in oFolderContents.
    > >Is there a easy way to
    > >
    > >-split the whole list up in pages of i.e. 20 files
    > >-show general info (i.e. xxx files in folder, listing 20

    > files on page y/z)
    > >-let the user have the possibility to call the page with

    > index i, where i
    > >stands for the i-th file on the list
    > >
    > >
    > >any good links out there?
    > >
    > >tia
    > >
    > >bartp
    > >
    > >
    > >
    > >
    > >
    > >--
    > >HyperART
    > >Paul Van Ostaijenlaan 4
    > >3001 Heverlee
    > >
    > >
    > >
    > >.
    > >
    bart plessers, Sep 14, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shahid Siddiqui
    Replies:
    2
    Views:
    324
    Cowboy \(Gregory A. Beamer\)
    Oct 15, 2003
  2. EvgueniB
    Replies:
    1
    Views:
    610
    Anthony Borla
    Dec 15, 2003
  3. Frank Fredstone
    Replies:
    1
    Views:
    429
    Jean-Francois Briere
    Jun 27, 2006
  4. Sam
    Replies:
    0
    Views:
    690
  5. Gonnasi
    Replies:
    6
    Views:
    361
    Gonnasi
    Oct 24, 2005
Loading...

Share This Page