ASP.NET C# File Download
Saturday, July 18, 2020 Category : ASP.NET 0
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();