文件下载
转载于:http://www.cnblogs.com/TiestoRay/archive/2013/09/30/3346692.html
public void FileDownLoadByByte(byte[] fileData, string fileName) { Response.Clear(); Response.ClearHeaders(); Response.Buffer = true; Response.ContentType = "application/octet-stream"; Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); Response.AppendHeader("Content-Length", fileData.Length.ToString()); Response.BinaryWrite(fileData); Response.Flush(); Response.End(); }