PDA

View Full Version : [CLOSED] AntiForgeryToken



jpadgett
Feb 11, 2013, 1:46 PM
Is there a way to add the Html.AntiForgeryToken() to a Html.X().FormPanelFor?

Daniil
Feb 11, 2013, 3:13 PM
Hi @jpadgett,

We could not see an easy way to accomplish it, but we would try the following.

Html.AntiForgeryToken() generates a string representing an HTML hidden field. You could cut that hidden field's value from that string using a regular expression. Then put this value into an Ext.NET Hidden field (respectively, putting that HiddenField into the FormPanelFor's Items).

Vladimir
Feb 11, 2013, 11:51 PM
Hi,

AntiForgeryField MVC helper is added to SVN, now you can use it like


@Html.X().AntiForgeryField()

jpadgett
Feb 12, 2013, 1:30 PM
Great! Thank you!