title: ASP .NET MVC anti-forgery token value, not HTML
body: <p>I'd like to obtain anti-forgery token value in ASP .NET MVC project. I have investigated the <a href="http://msdn.microsoft.com/en-us/library/dd470175" rel="nofollow"><code>HtmlHelper.AntiForgeryToken</code> helper method</a> only to find that it uses the <a href="http://msdn.microsoft.com/en-us/library/system.web.helpers.antiforgery" rel="nofollow"><code>AntiForgery</code> class</a> which provides public method <code>GetHtml</code> used by the aforementioned helper. The problem is this method only returns the HTML of the entire hidden form input field represented by <code>HtmlString</code>. I'd like to get my hand on the name of the field and its value, which I am able to do now parsing the returned <code>HtmlString</code>, but not in any clear way. Everything useful (like <code>IAntiForgeryConfig</code> implementation for the field name) is internal. Is there any other facet of the MVC infrastructure that I am not aware of that offers public members allowing the access to the form field name and value rather that the serialized values?</p>