Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > separate list in pages x

Reply
Thread Tools

separate list in pages x

 
 
Bart Plessers \(artabel\)
Guest
Posts: n/a
 
      09-09-2003
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



 
Reply With Quote
 
 
 
 
chris lynn
Guest
Posts: n/a
 
      09-14-2003
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
>
>
>
>.
>

 
Reply With Quote
 
 
 
 
bart plessers
Guest
Posts: n/a
 
      09-14-2003
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" <(E-Mail Removed)> wrote in message
news:032d01c37a60$1c6424c0$(E-Mail Removed)...
> 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
> >
> >
> >
> >.
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Separate Tabs, Separate Sessions BigAndy Firefox 0 05-09-2007 09:27 AM
Separate Tabs, Separate Sessions BigAndy Firefox 0 05-09-2007 09:26 AM
Using separate classpaths for separate classes? Frank Fredstone Java 1 06-27-2006 06:46 AM
How to separate directory list and file list? Gonnasi Python 6 10-24-2005 01:07 PM
How to use several separate classes (separate files) to be executed in one class (another file) EvgueniB Java 1 12-15-2003 01:18 AM



Advertisments