2014-09-13 26 views

回答

1

您可以在同一索引視圖中執行所有基本插入,更新和刪除操作動作

在創建

@Ajax.ActionLink(
"CreateText", 
"CreateMethod", 
"ControllerName", 
new { id = item.EntityId}, 
new AjaxOptions { @UpdateTargetId = "CreateDivId" }) //create div in view and assign id to it so that edit form will appear there on click. 

對於編輯

@Ajax.ActionLink(
"EditText", 
"EditMethod", 
"ControllerName" 
new { id = item.EntityId}, 
new AjaxOptions { @UpdateTargetId = "EditDivId") //create div in view and assign id to it so that edit form will appear there on click. 

對於刪除

@Ajax.ActionLink(
"DeleteText", 
"DeleteMethod", 
"ControllerName" 
new { id = item.EntityId}, 
new AjaxOptions { @UpdateTargetId = "DeleteDivId" }) //create div in view and assign id to it so that edit form will appear there on click. 
+0

thaaaaaannnnnkkkkkssss – Amir 2014-09-26 08:02:34

+0

@Amir歡迎伴侶 – 2014-09-26 10:06:15

相關問題