I have an ImageField in a gridview. The DataImageUrlFormatString property is ~photos/{0}.jpg. The {0} is replaced with the photo_id which comes from a database. The images are all named based on the photo_id, i.e. 1001.jpg, 1002.jpg etc.
I need to display no_image.jpg whenever no jpg file exists for a record. I thought DataAlternateTextFormatString was supposed to do that, but apparently it only works if the id number coming from the database is null and NOT if the jpg file is missing. I did some searches to try to find an answer but didnt have any luck. I'm new to asp.net so I'm pretty much lost at this point. If anybody could point me in the right direction i would appreciate it.
I need to display no_image.jpg whenever no jpg file exists for a record. I thought DataAlternateTextFormatString was supposed to do that, but apparently it only works if the id number coming from the database is null and NOT if the jpg file is missing. I did some searches to try to find an answer but didnt have any luck. I'm new to asp.net so I'm pretty much lost at this point. If anybody could point me in the right direction i would appreciate it.