关于邮件附件下载的问题。。。。 没有人帮忙吗?是不是给的分太少了? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我是用DataReader if (dataReader.Read()) { string filename = dataReader.GetSqlValue(0).ToString(); long byteSize = dataReader.GetBytes(2,0,null,0,0); byte[] ImageData = new byte[byteSize]; dataReader.GetBytes(2,0,ImageData,0,(int)byteSize); Response.Clear(); Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312"); Response.ContentType = "application/octet-stream"; Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(filename)); Response.BinaryWrite(ImageData); Response.End(); } 求助:如何在winform中创建自己的控制台 sql什么时候用索引什么不时候不应该用? 送分题:如何代码添加一个chart在page里? C# .NET 关于数据库连接 接口的实际意义,接口和抽象类之间的实际区别!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! asp.net 怎么使用asp程序? 请教:不同WINFORM中的DATASET如何保持一致?? 帮我看看这段发传真的代码哪里错了? C# 的高手速度来高分 EPPlus导出EXCEL文件日期怎么处理? 我的ASP.NET程序总是出现编码问题,请教! 求PPC上写无边框TEXTBOX控件的方法。
if (dataReader.Read())
{
string filename = dataReader.GetSqlValue(0).ToString();
long byteSize = dataReader.GetBytes(2,0,null,0,0);
byte[] ImageData = new byte[byteSize];
dataReader.GetBytes(2,0,ImageData,0,(int)byteSize);
Response.Clear();
Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(filename));
Response.BinaryWrite(ImageData);
Response.End();
}