2
只需要插入更新刪除並顯示在mvc 4 Razor中相同的視圖? 解決方案只是在同一視圖中的許多局部視圖? 對您的建議有幫助插入更新刪除,並在同一視圖中選擇mvc 4
只需要插入更新刪除並顯示在mvc 4 Razor中相同的視圖? 解決方案只是在同一視圖中的許多局部視圖? 對您的建議有幫助插入更新刪除,並在同一視圖中選擇mvc 4
您可以在同一索引視圖中執行所有基本插入,更新和刪除操作動作。
在創建
@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.
thaaaaaannnnnkkkkkssss – Amir 2014-09-26 08:02:34
@Amir歡迎伴侶 – 2014-09-26 10:06:15