日期:2014-05-17 浏览次数:20448 次
private void DoExport(byte[] bytes) { try { var fileName = string.Format("{0}.txt", DateTime.Now.ToString("yyyy.MM.dd_HH.mm.ss")); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment; filename="+fileName); Response.BinaryWrite(bytes); Response.Flush(); Response.End(); } catch { } }