Hi,
The subject says it all.
The BeginForm does not have a way of giving the form name so that I can do this
<A HREF="JAVASCRIPT:Form1.submit()">Next</A>
This fails because no Form1????
Malcolm
Hi,
The subject says it all.
The BeginForm does not have a way of giving the form name so that I can do this
<A HREF="JAVASCRIPT:Form1.submit()">Next</A>
This fails because no Form1????
Malcolm
If you've only got one form on the page the following code should work:
<a href="javascript:document.getElementByTagName('form').item(0).submit()">Next</a>
This is how you add a "name" attribute using the htmlAttributes object
<% using (Html.BeginForm("Action", "Controller", FormMethod.Post, new { name = "MyFormName" }))
If you're using jQuery use
<a href="javascript:$('form').submit();">Submit</a>