I am setting the imageurl of a hyperlink control on page_load. I want to check for the existence of the image and if it's not on the server, set the imageurl to some default. What's a good way to do this (using C#)?
I am setting the imageurl of a hyperlink control on page_load. I want to check for the existence of the image and if it's not on the server, set the imageurl to some default. What's a good way to do this (using C#)?
Since you are sitting on server... you can check the file by using System.IO.File.Exists("FILE_PATH"). This returns either true or false. Guess the remaining logic :) mE! ------------------- Therez No Place like ... 127.0.0.1