I would like to find out if a filename exists in my Image folder, how can I do this in a function using javascript?
How about call a function from Javascript to a C# File? (ON SERVER)
Thank you
I would like to find out if a filename exists in my Image folder, how can I do this in a function using javascript?
How about call a function from Javascript to a C# File? (ON SERVER)
Thank you
you have to provide more context
if your javascript is running within browser and you want to check if file exists on client's computer - you can't
if you want to check Image folder on server - you could do AJAX request for that image and then check if HTTP response code is 200 although that would also blow up your traffic and is not a great choice
best option would be to do AJAX request that will invoke a check on server side like /check?image_name=file.jpg