Results 1 to 6 of 6

Thread: How would I make a photogallery?

  1. #1

    Thread Starter
    Member Comn8u's Avatar
    Join Date
    Jul 2004
    Posts
    35

    How would I make a photogallery?

    Would I store the links of pictures in the database or the actual image?

    How would I be able to display 25 pictures per page? Would I use a repeater or dataset?
    It's not the size of the dog in the fight, it's the size of the fight in the dog.

  2. #2
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092
    There's really no right or wrong answer to questions like these, it's a matter of preference.

    You'll just have to consider the alternatives and see which works best for you.

    Eg. Whilst storing just links in a db and having the images in a driectory might be easier to code, storing the images directly in the db would probably be easier to maintain the db.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    I always suggest storing the URL to the image instead of the whole file itself.

  4. #4

    Thread Starter
    Member Comn8u's Avatar
    Join Date
    Jul 2004
    Posts
    35
    How would I go about displaying the pictures once they are in the database. I would like to put 25 pictures per page and use paging for the other pages. Would it be possible to store links in the database and then display them in a dataset and then add the <a> tag to each picture?
    It's not the size of the dog in the fight, it's the size of the fight in the dog.

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by Comn8u
    Would it be possible to store links in the database and then display them in a dataset and then add the <a> tag to each picture?
    Yes. They'll be values inside some field in the dataset.

    Then you can place the URL (probably with a little modification) inside an <a> tag, InnerHTML probably.

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    And to DISPLAY the image, you can use the <img> tag (runat server) and place the value there.

Posting Permissions

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



Click Here to Expand Forum to Full Width