public ActionResult Upload(UploadFormViewModel postForm) { var validationOutputs = new string[0]; bool validForm = uploadManager.ValidateUploadForm(postForm, out validationOutputs); if (validForm) { string responseMessage; bool addItem = uploadManager.CreateUploadItem(postForm, out responseMessage); if (addItem) { Session["updateMessage"] = responseMessage; return(RedirectToAction("Index", "Items")); } else { Session["updateMessage"] = new string[] { responseMessage }; return(RedirectToAction("Upload", "Items")); } } else { Session["updateMessage"] = validationOutputs; return(RedirectToAction("Upload", "Items")); } }