I have a delete form that looks like this:
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
<p>
<input type="submit" value="Delete"/> |
@Html.ActionLink("Back to List", "Index")
</p>
}
But my controller action is complaining that __RequestVerificationToken is not present. I'm confused. I put the AntiForgeryToken in there. When I view the rendered HTML for the delete form, there is no hidden field--as if the AntiForgeryToken call is just being skipped. But why?