how to show picture stored in database?

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

hi

asp.net 3.5

I'm wonder how to show a picture stored in the database, when the img tag
isn't in a aspx page but a htm page.

Can I just set the src value to a aspx page which outputs the image or is it
something else I need to do when target is inside a htm file?
 
Jeff said:
hi

asp.net 3.5

I'm wonder how to show a picture stored in the database, when the img tag
isn't in a aspx page but a htm page.

Can I just set the src value to a aspx page which outputs the image or is it
something else I need to do when target is inside a htm file?

You should be able to set the src tag of the img tag to an aspx page
which outputs the raw image data. This is commonly used to display
images from the database. The src will probably look something like
http://<server>/ImageCreator.aspx?id=<somevalue> Then your page
"ImageCreator.aspx" will look at the id, query the data from the
database and send it to the client.

This can be done using Handlers as well.

jjardine
 
Back
Top