This line
return View(model1);
looks for the view named exactly like the action in which it was called. Calling this line from PostValues
action assumes there is a view PostValues.cshtml
(which apparently does not exist). If you still want to use view Index
- you should specify this explicitly:
if (!ModelState.IsValid)
{
return View("Index", model1);
}