I have image byte array stored in session.
Byte[] bytes = (Byte[])Session["STORED_IMAGE"];
I want display this in image control after postback. I have tried this code
Byte[] bytes = (Byte[])Session["STORED_IMAGE"];
Response.Buffer = true;
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "image/jpeg";
Response.AddHeader("content-disposition", "attachment;filename=sandra");
Response.BinaryWrite(bytes);
Response.Flush();
Response.End();
It displays the image. but also downloads it. I just want to display not download. Can anyone help me doing this?Thanks in advance.