Author: Schnauzer20 | Posted on: 9/10/2009 11:04:29 AM | Views : 259

Hi,
I have a jpg file in a directory.  I need to read it and display it in the browser.  What is the best method?  What I have so far is


byte[] byteArray = File.ReadAllBytes("c:\\myimage.jpg");
Response.Clear();
Response.ContentType = "image/jpg";
Response.BinaryWrite(byteArray);
Response.End();


This is actually not working, I'm getting a weird message saying that the xml page cannot be displayed.  
...

Go to the complete details ...