1

I am using asp.net 4.0 and all my images are stored in database using admin CMT.

I want to create a image gallery to display all thumbnail images in a list and lightbox effect for big images.

lightbox works fine if we have a physical location of the image, but in this case it is binary data (image datatype) in database.

Can you help me how can i assign the (binary) image to lightbox.

Murtaza
  • 3,045
  • 2
  • 25
  • 39

3 Answers3

1

You need a script that ouputs a single image under a specified URL. Then you can take these URLs and provide them to the lightbox.

webjunkie
  • 6,891
  • 7
  • 46
  • 43
1

Using lightbox for displaying images from database directly

Create a HTTP handler and called the handler in the in every img scr

<img src="ShowImg.ashx?ID=imageid" alt="imgetitle" />

handler will load the image from the imageid passed as a querystring to it. on handler we will right the code to read the image from database and display on the page.

Murtaza
  • 3,045
  • 2
  • 25
  • 39
0

Image control will read value returned by HTTPHandler but problem with lightbox is that you must provide img src to HyperLink navigateUrl or and those are not able to read Image value returned by HTTPHandler, you must have lightbox plug-in that is able to read image files...

NikolaTasic
  • 41
  • 1
  • 5