View Full Version : Does an image exist?
Ultragames
01-05-2007, 08:02 PM
I need to use ASP to check if a file exists. If it does, i just need to put it on the screen, if not, i need to put a "Image Not Found" image on the screen.
How do i do this in ASP. This is easy in PHP, but i'm new to ASP.
Thank you.
u can use the Scripting.FileSystemObject .
create an object of that and use the properties or methods .
u hv a FileExists() method with which u can check for the existence of the image or any file .if not u can display the "Image Not Found" message.
thanks
dev
degsy
01-12-2007, 04:08 PM
Is the image in the filesystem or a database?
http://www.w3schools.com/asp/asp_ref_filesystem.asp
If it is in a database then you can query for the image and check the status using EOF
Or if you have a full list then you can check if a row is empty or null
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.