title: How to use built-in HTML helpers within a custom HTML helper?
body: <p>I'm trying to use BeginForm in a helper razor function eg.</p>
  
  <pre><code>@helper Modal(string name)
  {
  &lt;div id="@name"&gt;
  
      @using (Html.BeginForm("Add", "User", FormMethod.Post)) {
          &lt;fieldset&gt;
              @Html.Label("Name")
              @Html.TextBox("Name", new { @class = "text ui-widget-content ui-corner-all" })
              @Html.Label("Email")
              @Html.TextBox("Email", new { @class = "text ui-widget-content ui-corner-all" })
  
              &lt;input type="submit" tabindex="-1" style="position:absolute; top:-1000px"&gt;
          &lt;/fieldset&gt;
      }
  &lt;/div&gt;
  }
  </code></pre>
  
  <p>However I am getting an error:</p>
  
  <pre><code>@MyHelper.Modal("dialog-form")
  </code></pre>
  
  <p>It's due to Html... markup, without it it obviously works fine with only html.</p>
  
  <p>What am I missing to make it working?</p>
  
  <p>I have added <code>@using System.Web.Mvc.Html;</code> but it still does not recognise FormMethod.</p>