开发者

How can we Create a lightbox gallery with sql images

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开发者_如何学Python 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.


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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜