Hi,
Every file is binary content as @Dave-Kreskowiak said, Now you need to specify your web browser by their application type and browser will render it.
So If you already have binary of that image then write a web Method which will return that binary data as an image, that function will take a id and return the image, now you will set that data to that particular image Tab e.g : <img src="data:image/bmp;base64,xxxxxxxxxxxxx...">
How to write an web method?
Example :
http://stackoverflow.com/questions/10127937/calling-a-pages-webmethod-from-javascript-on-a-different-page[
^]
How to return image using web Method?
[WebMethod]
[return:XmlElement("imageData", DataType="base64Binary")]
public byte[] CreateImage()
{
using(Bitmap image = new Bitmap(100, 100))
using(Graphics imageGraphics = Graphics.FromImage(image))
{
imageGraphics.FillRectangle(Brushes.Red, 0, 0, image.Width, image.Height);
imageGraphics.DrawRectangle(Pens.Blue, 0, 0, image.Width, image.Height);
using(MemoryStream stream = new MemoryStream())
{
image.Save(stream, ImageFormat.Png);
stream.Flush();
return stream.ToArray();
}
}
}
Another Article which will help you :
Submit Images to Web Service and Get Them Back[
^]