I want to be able to submit a form outside the Html.BeginForm, this is what i have and is working inside the form..
<button type="submit" class="btn btn-default" value="previous" formaction='@Url.Action("Previous", "StudentTest")' >previous </button>
I looked around and found a solution: give ur Html.BeginForm a name like this:
Html.BeginForm(new {name = "form1" })
and then use this :
onclick="document.form1.submit();"
But is it possible to use the same thing in the Url.Action instead of the onclick because i need the function in the controller?
Cheers
Try this:
Or try other way: