【发布时间】:2014-08-05 07:48:48
【问题描述】:
我在我的 asp.net 网站的图像控件中绑定了一个图像。
我正在使用 C# 来开发它。下面是绑定图片的代码。
byte[] imageBytes = System.IO.File.ReadAllBytes("filepath");
string base64String = Convert.ToBase64String(imageBytes, 0, imageBytes.Length);
this.testImage.Src = "data:image/jpeg;base64," + base64String;
现在我想在另一个事件中从该图像控件 (testImage) 中获取流。 我不想将图像保存在任何服务器路径中。
我该怎么做?
提前致谢。
【问题讨论】:
标签: c# asp.net image stream iostream