【发布时间】:2013-12-18 06:42:24
【问题描述】:
我在会话中存储了图像字节数组。
Byte[] bytes = (Byte[])Session["STORED_IMAGE"];
我想在回发后在图像控件中显示它。我试过这段代码
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();
它显示图像。但也下载它。我只想显示不下载。 任何人都可以帮我做这件事吗?在此先感谢。
【问题讨论】: