Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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
Posted

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

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...