ImageUrl
needs an URL.
So instead of assigning it with a local file name on disk, use something like this (where ~
stands for 'application root folder':
uploadedimage.ImageUrl = "~/Images/yourImage.png"
You have to supply it with:
- An image inside your application root folder;
- An URL that is catched by a HttpHandler, that generates / loads the image from a different location (a little harder to do, but if you need to load from another location then inside application root, this is the best option).