Using with database

Topics: User Forum
Oct 4, 2006 at 9:43 AM
how can i use lightbox with blob
currently i use blob to store image
and i want to use lightbox to show image in database
plesae help mee
Oct 5, 2006 at 2:57 PM
You will need to pull the blob information out of the database and convert it to an image. Then set the path the image as the url for the control. Here's an example:

Use an HTTP handler (imgdb.ashx) to pull the data from the db.
Write the content to the OutputStream property of the handler's Http response.

For lbn image control definition, set the path to the url <lbn:image imageurl="imgdb.ashx?imgId=1234" />. The imgId query parameter is used to pull the correct image from the db.

That's just an idea. However, it's not a bad idea to have a dbimage control to have lbn do the work for you... I'll add it as a feature!
Oct 5, 2006 at 3:01 PM
This discussion has been copied to Work Item 4042. You may wish to continue further discussion there.