ASP.NET C# File Download
Posted on Saturday, July 18, 2020
|
No Comments
HttpContext.Current.Response.ContentType = "application/x-download";
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=RosterFormat.xlsx");
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.WriteFile(path);
HttpContext.Current.Response.End();