e.g. 3.14 Checking for Form Validation Errors
This commit is contained in:
parent
82fd44ba0f
commit
044c51ef8b
@ -37,8 +37,16 @@ namespace PartyInvites.Controllers
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public ActionResult RsvpForm(GuestResponse guestResponse)
|
public ActionResult RsvpForm(GuestResponse guestResponse)
|
||||||
{
|
{
|
||||||
// TODO: Email guestResponse to the part organizer
|
if (ModelState.IsValid)
|
||||||
return View("Thanks" ,guestResponse);
|
{
|
||||||
|
// TODO: Email guestResponse to the part organizer
|
||||||
|
return View("Thanks", guestResponse);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// there is a validation error - redisplay the for
|
||||||
|
return View();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user