0
我試圖做一個CRUD操作。操作是,如果用戶點擊從網格編輯,則數據應顯示在網格下方的控件中。這意味着,網格和控件位於同一頁面中。下面是代碼:MVC 4中的C#CRUD操作4一個視圖
@Html.ActionLink("Edit", "Update", new { id=item.Country_ID })
在控制器:
[HttpPost]
public ActionResult Update(TBL_Country tbl_country)
{
if (ModelState.IsValid)
{
db.Entry(tbl_country).State = EntityState.Modified;
db.SaveChanges();
}
return View(tbl_country);
}
但是,它顯示了一個錯誤,指出:
它不會有任何意見。我怎樣才能再次提供相同的頁面視圖?
我是MVC4的初學者。