Sunil Sudhansu

Sunil Sudhansu

  • 1.4k
  • 307
  • 32.5k

How to Redirect action after export excel from ExcelPackage

Jan 16 2020 4:37 PM
Sheets.Cells["A:AZ"].AutoFitColumns();
Response.Clear();
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", "attachment: filename=" + "ErrorReport.xlsx");
Response.BinaryWrite(Eps.GetAsByteArray());
Response.End();
return this.RedirectToAction("index",false);
 
 
but its not redirect 
How to Redirect Index Action in mvc 

Answers (2)