日期:2014-05-17 浏览次数:20472 次
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment; filename=" + <filename>);
BinaryWriter bw = new BinaryWriter(Response.OutputStream);
bw.Write(fileData); //fileData是你的数据。
bw.Close();
Response.ContentType = ReturnExtension(<file extension>);
Response.End();