public ActionResult AddColour(UserColourViewModel input) { // Validate the model if (ModelState.IsValid == false) return View("UserColour"); // Redirect to overview page and pass along the user data return RedirectToAction("Overview", input); }
/* Display the profile overview */ public ActionResult Overview(UserColourViewModel input) => View("Overview", new UserColourViewModel { // Populate the profile view with name and colour Name = (string) HttpContext.Application["user"], Colour = input.Colour });