示例#1
0
 public IActionResult Contact(Contact model)
 {
     ViewBag.Message = "Contact Us.";
     if (ModelState.IsValid)
     {
         return View("Thanks", model);
     }
     return View(model);
 }
示例#2
0
 public IActionResult Contact()
 {
     ViewBag.Message = "Contact Us.";
     var model = new Contact { AllowContactAboutOffers = true };
     return View(model);
 }