public IActionResult Index(ValidationDemoViewModel model) { if (ModelState.IsValid) { //Save... //Redirect to thanks page? } return(View(model)); }
public IActionResult Index() { var model = new ValidationDemoViewModel(); return(View(model)); }
public IActionResult Index(ValidationDemoViewModel model) { if (ModelState.IsValid) { //Save... //Redirect to thanks page? } return(View(model)); }
public IActionResult Index() { var model = new ValidationDemoViewModel(); return(View(model)); }