예제 #1
0
 public ViewResult RsvpForm(GuestResponse guestResponse)
 {
     if (ModelState.IsValid)
     {
         guestResponse.Submit();
         return View("Thanks", guestResponse);
     }
     else // Validation error, so redisplay data entry form
         return View();
 }
예제 #2
0
 public ViewResult RsvpForm(GuestResponse guestResponse)
 {
     if (ModelState.IsValid)
     {
         guestResponse.Submit();
         return View("Thanks", guestResponse);
     }
     else
     {
         return View();
     }
 }