System.IO.Stream问题!请求帮助!!! string image = this.Image1.ImageUrl;有个一个图片asp:image控制保存着想把转化成System.IO.Stream请问该怎么写?System.IO.Stream oStream=????? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 lz是想把image的imageurl保存到文本中吗? StreamWriter SWReport = new StreamWriter(路径); SWReport.Write(内容); if (File.Exists(LocalFullPath)) { FileStream Stream = new FileStream(LocalFullPath, FileMode.Open, FileAccess.Read); byte[] bt = new byte[Stream.Length]; Stream.Read(bt, 0, (Int32)Stream.Length); Stream.Close(); }拿到路径。然后转换成byte System.IO.Stream oStream = System.IO.File.OpenRead(image); 你这个换成byte后,怎么形成System.IO.Stream oStream呢? 我以为你要2进制字节保存数据库的System.IO.Stream oStream = System.IO.File.OpenRead(image);直接这样拿就可以了。 <asp:Image ID="Image1" runat="server" ImageUrl="~/a.jpg" />String path = Server.MapPath(Image1.ImageUrl);System.IO.Stream stream = System.IO.File.Open(path, System.IO.FileMode.Open); 新人求助哇。。我是无能为力了。。。 进销存系统成本核算的问题。。。。 ASP.NET MVC问题.我很费解. 请教各位 如何利用堆栈跟踪查找错误啊 一下面的错误为例能简单说说吗?谢谢 如何读取XML文件中一节点值? 如何实现dropdownlist的多级联动 代码为什么不执行啊?点button1下,label13的文本为什么不变啊? 倒!怎么没有人回贴,重开一贴!有源码,在线等 怎么安装ASP.NET Reports Starter Kit ? 为什么编译好的网站在IIS中浏览时报错? 间隔读取数据库记录,如何解决?? ConfigurationSourceFactory.Create的问题
StreamWriter SWReport = new StreamWriter(路径);
SWReport.Write(内容);
{
FileStream Stream = new FileStream(LocalFullPath, FileMode.Open, FileAccess.Read);
byte[] bt = new byte[Stream.Length];
Stream.Read(bt, 0, (Int32)Stream.Length); Stream.Close();
}拿到路径。然后转换成byte
我以为你要2进制字节保存数据库的
System.IO.Stream oStream = System.IO.File.OpenRead(image);直接这样拿就可以了。
String path = Server.MapPath(Image1.ImageUrl);
System.IO.Stream stream = System.IO.File.Open(path, System.IO.FileMode.Open);