Display Image from Database in an Image control

C

chrispragash

Hello Everybody,

I have a server control that stores an image in the database as an
image datatype. I would like to display this image (may be in an image
control) along with other text in a page. What is the best way to
achieve this functionality. Thanks for all the help in advance.

Regards,
Chris
 
A

Aidy

I'd have a ViewImage.aspx page that accepts the ID of the image to store in
your DB then have that page access the image and right it to the response
stream. Your page would then construct tags like

<img src="ViewImage.aspx?ID=123">

Ideally you should store the images on the file system and the path of the
images in the DB.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top