title: How can I name a form with Html.BeginForm()?
body: <p>How do I give a name to a form in ASP.NET MVC using <code>Html.BeginForm()</code>? <strong>I want only the name, not the action or controller name</strong> because I want to post it through Javascript. I think it should be something like <code>Html.BeginForm(id = "frm")</code>.</p>
  
  <p>I tried the following: </p>
  
  <pre><code>Html.BeginForm(null,null,new{id="frm",name="frm})
  
  Html.BeginForm(new{@id="frm",@name="frm})
  </code></pre>
  
  <p>But the above code produces output like this:</p>
  
  <pre><code>&lt;form action="/Main/Index/Id?name=Id" method="post"&gt;
  </code></pre>