根据文件url怎么实现将文件读入byte[] buffer中? 根据文件url怎么实现将文件读入byte[] buffer中?知道的大神,赶紧指条明路吧 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 byte[] photo_byte = null;//strFile using (FileStream fs = new FileStream(strFile, FileMode.Open, FileAccess.Read)) { using (BinaryReader br = new BinaryReader(fs)) { photo_byte = br.ReadBytes((int)fs.Length); } DownloadData("");返回byte[] 没有返回stream的吧。用webclient大一点文件会超时,有没其他的方法? string url = "文件地址"; WebClient wb = new System.Net.WebClient(); var photo_byte = wb.DownloadData(url); FileStream 读的是本地文件路径。我需要http路径。 Linq存储过程(100分) sessionState配置问题 在GridView中判断数据显示图片 关于服务端事件回发与UpdatePanel的问题(疑惑) B/S应用程序 如何加时间限制?(思路) 从EXCEL导入数据的错误 OLE DB ? 如果定时激活事件 异常..... 求助~~~~~未将对象引用设置到对象的实例 怎么用ASP.NET做邮件群发呢??? 用POST方式发送json格式的数据 gridview使用数据字典方法,求教高人
//strFile
using (FileStream fs = new FileStream(strFile, FileMode.Open, FileAccess.Read))
{
using (BinaryReader br = new BinaryReader(fs))
{
photo_byte = br.ReadBytes((int)fs.Length);
}
WebClient wb = new System.Net.WebClient();
var photo_byte = wb.DownloadData(url);