string PathStr = "D:\\Photo\\5.jpg";
MemoryStream MStr = new MemoryStream(File.ReadAllBytes(PathStr), true);
MStr.Close();context.Response.Clear();
context.Response.ContentType = "image/png";
context.Response.BinaryWrite(MStr.ToArray());//为什么这么写打开这个页面还是能呈现出图片而不是报错
//这是一个ASP.NET网站中的一般处理页面
MemoryStream MStr = new MemoryStream(File.ReadAllBytes(PathStr), true);
MStr.Close();context.Response.Clear();
context.Response.ContentType = "image/png";
context.Response.BinaryWrite(MStr.ToArray());//为什么这么写打开这个页面还是能呈现出图片而不是报错
//这是一个ASP.NET网站中的一般处理页面
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货