1

How do I use rad binary image outside of a databound control ?

here is a link to the control :

http://www.telerik.com/help/aspnet-ajax/radbinaryimage.html

stooicrealism
  • 548
  • 2
  • 9
  • 29

1 Answers1

2

It's just image binary data in the DB that you want to be put into an image?

Convert from binary data to an image control in ASP.NET

Faithfully copied..

Create a regular HTML img element like so:

<img runat="server" id="image"  />

And in code behind do this:

image.src="data:image/png;base64,"+Convert.ToBase64String(imageBytes);

Where imageBytes is a byte[]

You are done. The image will be displayed.

Community
  • 1
  • 1
Dave Walker
  • 3,498
  • 1
  • 24
  • 25
  • 1
    Yeah - in the same way that all images are cross browser compatible. All the Telerik control is doing is basically this but loading it from an HTTPHandler. – Dave Walker Dec 21 '11 at 15:55