Hi andiyuniar
I've had this issue before. The way I handled it was to "spoof" a content page to change it's ContentType to display images. I would pass it an id via query string and then set the imageurl to the spoofed page.
Here's an example that should help you. Please keep in mind, I don't know if it's the best solution, but it works for me. Also, there could be some performance hits if you have too many images being loaded on your page via this method.
Create a WebForm... i called mine LoadImage.aspx
Place this code in the Load event
<br />if (Request.QueryString["Id"] != null)<br /> {<br /> int Id = Convert.ToInt32(Request.QueryString["Id"].ToString());<br /> byte[] image = null;<br />
Then on the page you want to bind your image to just set the ImageUrl property to the webform plus query string.
<br /> Image1.ImageUrl = "LoadImage.aspx?Id=1";<br />
Happy Coding