Quantcast
Channel: Andrey Shchekin's Blog - Latest Comments
Viewing all articles
Browse latest Browse all 50

Re: Multiple submit buttons with ASP.NET MVC: final solution

$
0
0

=== MY SOLUTION ==

<input type="submit" value="Standard action"><input data-action="@Url.Action(" mysecondaction")"="" type="submit" value="Second action">

== JavaScript (jQuery): ==

    $('form input[data-action]').click(function () {        this.form.action = $(this).data('action');    });

===

And that's it.


Viewing all articles
Browse latest Browse all 50

Trending Articles