Hello,
I have a database where the user may upload an alternative image for a device.
If the image is not present in the database, the datasource returns a DBNull and the binary image should show the standard image file from the servers image directory.
I used this code which works fine if the image is not present.
If the database returns the image I get this error message during the page creation:
"Cannot set image Url if DataValue is already set"
If I remove the ImageUrl property, the image of the database is shown properly. So it's surely not a corrupted image file.
I am currently using the following workaround:
Is it possible to set DataValue and the alternative ImageUrl Property of a single RadBinaryImage?
I would expect the RadBinaryImage to ignore the ImageUrl if DataValue has data.
UPDATE
Forget about the thread.
Simply swapping the order of ImageUrl and DataValue did the trick. :)