public ActionResult ItemsTypePartialDelete(System.String Code) { var model = new object[0]; if (Code != null) { try { // Insert here a code to delete the item from your model ItemTypeList.DeleteItemType(Code); } catch (Exception e) { ViewData["EditError"] = e.Message; } } return(PartialView("_ItemsTypePartial", ItemTypeList.GetData())); }