PDA

View Full Version : retrieving images from folder without using components


imsan
05-12-2006, 08:51 PM
can any boody help me , i want to retrieve images from folder, but if i add asome more images to tht , it should b automatically retrieved , is it possible?????

degsy
05-15-2006, 04:27 PM
You would need a list of the images.
Either using the FSO to loop through the folder to get the image names or by using a database or file to store the image names.

http://www.w3schools.com/asp/coll_files.asp

imsan
05-16-2006, 12:45 AM
thnx 4 tht it really worked , actually i have 1 more query , i have decided to display only 6 images on a single page, so is it possible tht another page will automatically get created when number of images increase or i have do manually.

actually m developin my final yr project of art gallery in asp. so can u help me

degsy
05-16-2006, 04:45 PM
A database would be best for this as the recordsets are very compatible with recordset paging.

What you can do is put your list of images into an array and then have variables for how many there are, how many you want to display and what number you are up to.

You can use use the querystring to tell the script where in the array to start and where to end outputting images.
You can also create links for Prev - Next etc.

imsan
05-17-2006, 10:46 PM
u know if i decide to have limited number of images on a single , for example i decide to have 6 images on a single page

i want tht if number of images increase automatically another page should b created and images should b placed.

is it possible??? if yes plz guide me how to do tht .
and ur advice really works

degsy
05-18-2006, 04:26 PM
You don't need to create another page. The querystring tells the script which images to display.

Look into Recordset Paging to get an idea of the process.

http://www.google.co.uk/search?hl=en&q=asp+recordset+paging&meta=

ghell
05-21-2006, 12:00 AM
A database would be best for this as the recordsets are very compatible with recordset paging.

What you can do is put your list of images into an array and then have variables for how many there are, how many you want to display and what number you are up to.

You can use use the querystring to tell the script where in the array to start and where to end outputting images.
You can also create links for Prev - Next etc.Dispite the ADODB.Recordsets page properties, they are really no better at paging than anything else in Classic ASP. If you have an array of the image names and a number you want per page you can have it all done on the fly by selecting 45 - 60 or whatever (that would be page 3 on 15 per page.. start = 3*15, end = 4*15 or however many there are if there arent 60.) pumping it into a database just to use adodb.recordsets would be total overkill for this.