Image Gallery

rangerstud620

Freshman
Joined
Jun 14, 2005
Messages
27
I'm looking at setting up an image gallery. I need to store the file names in a database because I will have an editable "Notes" field for each image. I've searched Google for setting up an image gallery this way but all I've found is displaying each image in a given directory or subdirectory. It doesn't seem like it should be too difficult to do but I'm not sure how to display the images with ASP.NET. Any hints to get me started? Thanks
 
Here are some ways:

1. Dynamically create and add image controls to your form, set all of their ImageURL properties.

2. If you dont want the overhead, create the html yourself and assign it to a Literal control

3. Use a repeater/datalist
 
It should not be too hard to do, but you'll have to do it all from code, dont expect some miracle control... (doing it from code is more fun anyway :P)

run trough your db and for every result, echo an <img src="imagename" alt="blabla" /> (i dont remember the code to do it, should be like something . Write) give them a class, and/or place them in div so you can place them like you want with Css
 
Thanks for the ideas...I think I'm going to try to use a datalist to start out with. I'm not sure if it will be the final solution but I will try it and see what happens.
 
Back
Top