ASP.NET MVC returning an xls file inside an zip file
问题 I have an asp.net mvc action that returns an xls file: public void Excel(string filename) { DAOSolicitacao dao = new DAOSolicitacao(); System.Threading.Thread.Sleep(5000); var products = dao.GetSolicitacoes(); var grid = new GridView(); grid.DataSource = products; grid.DataBind(); Response.ClearContent(); Response.Buffer = true; Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", filename)); Response.ContentType = "application/ms-excel"; Response.Charset = "";