2014-09-13 41 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

相关问题