// [ValidateAntiForgeryToken] public ActionResult CreateUser(User user, string check) { if (check == "on") { user.Active = true; } else { user.Active = false; } if (user != null) { u.InsertUser(user); u.CommitUser(); return(RedirectToAction("UserIndex")); } ViewBag.Type_id = new SelectList(t.GetTypes(), "Id", "type", user.Type_id); return(View(user)); }