In a web application, image controls have a property ImageUrlthat points to some side of the server script that will return the image. I am not familiar with Ext.Net.Image, but I suppose you need to use the http handler to serve the image:
public class ImageHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
var id = context.Request["id"];
byte[] imageData = FetchImageFromDb(id);
context.Response.ContentType = "image/png";
context.Response.OutputStream.Write(imageData, 0, imageData.Length);
}
public bool IsReusable
{
get { return true; }
}
}
and then specify the image control point for this common handler:
Ext.Net.Image image = new Ext.Net.Image();
image.ID = "imgShow";
image.ImageUrl = "~/ImageHandler.ashx?id=123";
FormLayout1.Items.Add(image);
image.items.Add(image);
source
share