【发布时间】:2013-09-17 11:04:48
【问题描述】:
我有以下aspx代码
<asp:Image ID="pbScannedImage" runat="server" />
而我的c#代码背后的代码是
System.Drawing.Image image;
image = System.Drawing.Image.FromStream(new MemoryStream(dDSImageViewerDTO.ROI));
pbScannedImage.Visible = true;
pbScannedImage.ImageUrl = "";
// This is available but I don't want to write file to the disk and
// assign directly to the image box something like
pbScannedImage.Image = image;
//i know this is not possible so any other work around would be great help
所以基本上我想将图像分配给图像控件而不将其写入其他任何地方。是否有可能,如果没有,是否有任何可用的解决方法?
【问题讨论】:
-
为什么不把
MemoryStream保存在session和MemoryStream的使用ashx返回内容 -
@ArjunVachhani 会议不是办法!
-
什么是
dDSImageViewerDTO.ROI -
@Curiosity 可以将临时的
Byte []保存在Session中吗?