Response.ClearHeaders(); Response.ClearContent(); Response.ContentType = Path.GetExtension(Path.GetFileName(path)); Response.AddHeader("content-disposition", "attachment; filename=" + path); Response.WriteFile(path);
Response.ClearHeaders(); Response.ClearContent(); Response.ContentType = "text/csv"; Response.AddHeader("content-disposition", "attachment; filename=" + Path.GetFileName(path)); Response.WriteFile(path)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)