How do I specify a form name in ASP.NET MVC using Html.BeginForm() ? I want only the name, not the name of the action or controller , because I want to publish it through Javascript. I think it should be something like Html.BeginForm(id = "frm") .
I tried the following:
Html.BeginForm(null,null,new{id="frm",name="frm}) Html.BeginForm(new{@id="frm",@name="frm})
But the above code produces the output as follows:
<form action="/Main/Index/Id?name=Id" method="post">
asp.net-mvc razor
user426306 Sep 10 '10 at 9:03 2010-09-10 09:03
source share