asp.net mvc - Html.AntiForgeryToken Helper not rendering request validation token hidden field in form -
following code in razor view not creating html input type hidden name "__requestverificationtoken" strange. have "logoff" action decorated attribute "validateantiforgerytoken".
@using (html.beginform("logoff", "account", formmethod.post)) { html.antiforgerytoken(); <input type="submit" value="logoff" /> }
what missing here?
it should be
@html.antiforgerytoken()
not
html.antiforgerytoken();
Comments
Post a Comment