public ActionResult Edit(int reference) { UploadFormViewModel newForm = uploadManager.EditUploadForm(reference); if (Session["reference"] != null) { Session.Remove("reference"); } if (Session["updateMessage"] != null) { var postMessage = Session["updateMessage"]; Session.Remove("updateMessage"); ViewBag.Collection = postMessage; } if (newForm == null) { Session["errorMessage"] = Resources.Processing.ProcessEditNoForm; return(RedirectToAction("Index", "Items")); } Session["reference"] = reference; return(View("Upload", newForm)); }