需要添加数据/标头值以包含Antiforgery令牌,因此要在ActionLink下面用.Ajax替换。 请您帮忙?
@Ajax.ActionLink(
"Delete","DeleteStudent","RqstProcessor",
new
{
id = current.key
},
new AjaxOptions
{
AllowCache = false,
HttpMethod = "POST",
UpdateTargetId = "StudentList",
InsertionMode = InsertionMode.Replace,
},
new
{
@class = "ignoreClick"
}
)