我有以下ajax.actionlink
要求Delete action method
删除对象:-
@if (!item.IsAlreadyAssigned(item.LabTestID))
{
string i = "Are You sure You want to delete (" + @item.Description.ToString() + ") ?";
@Ajax.ActionLink("Delete",
"Delete", "LabTest",
new { id = item.LabTestID },
new AjaxOptions
{ Confirm = i,
HttpMethod = "Post",
OnSuccess = "deletionconfirmation",
OnFailure = "deletionerror"
})
}
但是有没有办法包含@Html.AntiForgeryToken()
在Ajax.actionlink
删除调用中以确保没有攻击者可以发送错误的删除请求?
BR