The way i store images... most important ones are stored in the database...
as a byte array...
i extract them on db call and i check them for a null value... null would
mean not there....
if you are storing them in on hard drive... you can still use a stream
reader to read it from the hard drive into memory... instead of using a
plain vanilla <img tag>
in that case what you will need to do is check the hdd for image... if found
read it from a hard drive.. into a memory stream... and output it to client
page....
http://www.microsoft.com/belux/nl/ms...tphandler.mspx
this link is a good example on how to use custom http handler to create a
file that serves images....
you can then use <img src"the image serving file.ext?your params"> to fetch
the image... (plus you can use caching to image on server etc... to make it
faster)
Note: you can do away by just create an aspx page that does the job.. but
you dont need to (infact custom handler would be about 5% faster)
--
Regards,
HD
"Steve" <st***@nowhere.com> wrote in message
news:uE**************@TK2MSFTNGP11.phx.gbl...
let's say that I have a webpage with an <img> tag and it has an invalid
src attribute, that is the image it points to doesn't exist. Is there any way
to catch stuff like that and handle it? For example, if I detect a
missing image, I could instead return a NoImageAvail.jpg image instead?
Weird question and I'm not sure how to ask it, but I suspect it could be
something that could be handled somehow. Thanks.
Steve