I have the following image in my aspx page
\"
The ImageUrl only replaces the tilde (~) in the control markup.
Try this instead:
string imageUrl = "~/AvatarImageFetch.ashx?memberid=" + memberid.ToString();
LargeImage.ImageUrl = Page.ResolveUrl(imageUrl);
Try the following in your ProcessRequest method:
context.Response.ContentType = "image";
using (System.IO.MemoryStream str = new System.IO.MemoryStream(objData.ToArray(), true))
{
str.Write(objData.ToArray(), 0, objData.ToArray().Length);
Byte[] bytes = str.ToArray();
context.Response.BinaryWrite(bytes);
}
where objData is the value you are reading from the database
Try setting the ContentType:
context.Response.ContentType = "image/png";
http://www.dotnetperls.com/ashx