1
Reply

Partial Views with Validations

Sasi Reddy

Sasi Reddy

10 years ago
758
public ActionResult VehicleLoanBasicDetailsSave(FormCollection form)
{
if (form["nameofapplicant"].Trim().Length == 0)
ModelState.AddModelError("Name", "Name is required");
return PartialView("_VehicleLoanBasicDetails");
}
In controller ,I wrote validations like that.But i need to display that errors .Can u tell me  how to display the errors 

Answers (1)