how to show picture stored in database?

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?
 
J

James Jardine

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
 

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,770
Messages
2,569,585
Members
45,081
Latest member
AnyaMerry

Latest Threads

Top