When you set the image as ImageUrl, the RadBinaryImage only resolve the path to the image, and it is directly shown in your browser.
When you bind the data, the image is hosted and then shown in the browser. There are several reasons for this not to work:
1. You don't have to call the DataBind, just assign the DataValue. Because DataBind will bind the control from it's parent, and it could even set new DataValue when binding, and clears yours.
2. The required HTTP handlers are missing from your web config. Check this help topic to see how to add them: http://www.telerik.com/help/aspnet-ajax/binaryimage.html
3. The data in the file is corrupted, incomplete or not in correct format.
To confirm that 3 is not the problem, you could read the files as Image:
And then convert the image back to byte and set it to the RadBinaryImage.
System.IO.MemoryStream stream =
Image YourImage = Image.FromFile (your_file_name,
image.DataValue = stream.ToArray();
You could debug the lines above after adding it in your page and see if the image is correct.
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed