Question : Replace missing images with default image

I have a code which changes an image dynamically depending on a variable.  While the variable will never be NULL there may not be an associated image in the directory.  At present this brings up the default "Red cross" image.  I need to basically look for the image file, if it doesnt exist i need to show a default image ("pic0.jpg") which is in the drectory with the rest of the images.
var vara="/EquipmentPhotos/pic" + equipmentid + ".jpg";    

Answer : Replace missing images with default image

Try the Load Optimized Defaults first., If that doesn't work try the other one. Good luck.
Random Solutions  
programming4us programming4us