0
<%= Ajax.ActionLink("Delete", "Delete", new { id = item.int_GroupId }, new AjaxOptions {HttpMethod="Delete", Confirm="Delete Group with Group ID:" + item.int_GroupId + " Group Name:" + item.vcr_GroupName})%>|
[HttpDelete]
public ActionResult Delete(int id, FormCollection collection)
{
try
{
Group group = _db.Groups.First(c => c.int_GroupId == id);
_db.Groups.DeleteOnSubmit(group);
_db.SubmitChanges();
return RedirectToAction("ManageGroup"); // redirect to same list page
}
catch
{
return RedirectToAction("ManageGroup"); // redirect to same list page
}
}
1) 삭제 작업 후에 업데이트 된 레코드를 어떻게 표시합니까? 알 수없는 이유로 리디렉션 작업이 발생하지 않습니다. 여기 사람들이 사용하는 가장 좋은 방법은 무엇입니까 2) 어떻게 확인을 표시합니까? 새 레코드가 표시된 후에 같은 목록 페이지에서 레코드가 삭제됩니까?ajax.action link delete는 업데이트 된 레코드를 표시 할 수 없습니다.