public ActionResult NewEmployee(EmployeeModel model) { if (ModelState.IsValid) { model.employeeimageaddress = "/Images/" + Guid.NewGuid() + ".jpg"; model.employeeimagefile.SaveAs(Server.MapPath(model.employeeimageaddress)); EmployeeDAL dal = new EmployeeDAL(); int id = dal.AddEmploee(model); ViewBag.msg = "Employee Added: " + id; ModelState.Clear(); ViewBag.cities = dal.Getcities(); return(View()); } else { EmployeeDAL dal = new EmployeeDAL(); ViewBag.cities = dal.Getcities(); return(View()); } }