title: How to get AntiForgeryToken value without hidden input
body: <p>@Html.AntiForgeryToken()
  renders hidden input</p>
  
  <pre><code>&lt;input name="__RequestVerificationToken" type="hidden" value="GuiNIwhIJZjINHhuS_8FenaFDXIiaE" /&gt;
  </code></pre>
  
  <p>How can I get token value only?
  Without ugly code like this:</p>
  
  <pre><code>public static IHtmlString AntiForgeryTokenValue(this HtmlHelper htmlHelper) {
          var field = htmlHelper.AntiForgeryToken().ToHtmlString();
          var beginIndex = field.IndexOf("value=\"") + 7;
          var endIndex = field.IndexOf("\"", beginIndex);
          return new HtmlString(field.Substring(beginIndex, endIndex - beginIndex));
      }
  </code></pre>