The model of type 'BusinessClassLibrary.Employee' could not be updated.
public int ID { get; set; } [Required] public string Name { get; set; } public string Gender { get; set; } public string City { get; set; } public string DOB { get; set; }
[HttpPost] [ActionName("create")] public ActionResult Create_Post() { if (ModelState.IsValid) { Employee employee = new Employee(); UpdateModel(employee); EmployeeBusinessLayer employeebusinesslayer = new EmployeeBusinessLayer(); employeebusinesslayer.AddEmployees(employee); return RedirectToAction("Index"); } return View(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)