//[ValidateAntiForgeryToken] public ActionResult UploadExcel(HttpPostedFileBase FileUpload, StudentViewModel student, StudentBusiness studentBusiness) { string output = studentBusiness.ImportStudents(FileUpload, student); if (output.Equals("No file chosen")) { ViewBag.Error = "No file chosen"; } else if (output.Equals("The format of the file is incorrect")) { ViewBag.Error = "The format of the file is incorrect."; } else { ViewBag.Errors = "" + output; return(View("Import_Report")); } return(View("UploadExcel")); }