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

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -