예제 #1
0
        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);
        }
예제 #2
0
 /* 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
 });