In Server how to check whether model has error or not in ASP.Net MVC?
Ritesh Singh
With the help of Data Annotation we check the model has error or not Example : public ActionResult Index(Models model){if (ModelState.IsValid) //this provide bool result for model is valid or not{ViewBag.Name = model.Name;ViewBag.Email = model.Email;}return View(model);}