0

I have a breakpoint set on the var u = new utility() and the var eamil. I keep getting the message. "The breakpoint will currently not be hit. no code has been loaded for this code location" The actionResult always returns a valid model and allows the code to process even though no information is entered on the form.

    [HttpPost]
    [ValidateAntiForgeryToken]
    public ActionResult prayerrequest(prayerRequstViewModel request)
    {
        if (ModelState.IsValid)
        {
            var u = new utility();
            var email = u.sendEmail(request);

            if(email == "true")
            {
                TempData["notice"] = "Success! Your prayer request has been successfully submitted.";
                return Redirect("~/Contactus/prayerrequest");
            }
            else
            {
                TempData["notice"] = email;
            }

        }
        return View();
    }
Justin Budd
  • 37
  • 1
  • 8

0 Answers0