【发布时间】:2014-02-01 09:51:57
【问题描述】:
我想将 id 传递给我的 actionresult 方法 Delete
public ActionResult Delete(Guid AssetTypeId)
{
// _repo.DeleteAssetType(AssetTypeId);
if (_repo.DeleteAssetType(AssetTypeId) == 1)
{
return Index();
}
else
{
TempData["AlertMessage"] = "The DELETE statement conflicted with the REFERENCE constraint ";
return Index();
}
来自剑道网格
.Action("Delete", "AssetType",new { AssetTypeId = "#=AssetTypeId#" }))
【问题讨论】:
-
使用 ajax 调用,请参阅我的回答此处以获取有关如何执行此操作的示例。 stackoverflow.com/questions/19643864/…
标签: asp.net-mvc-4 methods kendo-ui actionresult