I have an Ajax form :
<%using (Ajax.BeginForm(...)){%>
...
<input id="btn1" type="submit" value="OK1"/>
<input id="btn2" type="submit" value="OK2"/>
<%} %>
both inputs do different jobs – is it possible to catch which input has been clicked ?
Give your input buttons different names:
And then in the controller action check if
action1was clicked by looking at the request parameters (the name of the clicked button will be sent):