i have the following ajax.actionlink
which calls a Delete action method
for deleting an object:-
@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"
})
}
but is there a way to include @Html.AntiForgeryToken()
with the Ajax.actionlink
deletion call to make sure that no attacker can send a false deletion request?
BR