public ActionResult ChangePasswordQuestionAndAnswer()
 {
     ViewBag.PasswordLength = MembershipService.MinPasswordLength;
     var user = MembershipService.GetUser(User.Identity.Name);
     var model = new ChangePasswordQuestionAndAnswerModel(user.UserName, user.PasswordQuestion);
     return View(model);
 }
        public ActionResult ChangePasswordQuestionAndAnswer(ChangePasswordQuestionAndAnswerModel model)
        {
            if (ModelState.IsValid)
            {
                if (MembershipService.ChangePasswordQuestionAndAnswer(User.Identity.Name, model.Password,
                    model.PasswordQuestion, model.PasswordQuestionAnswer))
                {
                    return RedirectToAction("ChangePasswordSuccess");
                }
                else
                {
                    ModelState.AddModelError("", "The password is incorrect or the new question and answer are invalid.");
                }
            }

            // If we got this far, something failed, redisplay form
            ViewBag.PasswordLength = MembershipService.MinPasswordLength;
            return View(model);
        }