I have a form with multiple submit buttons:
using(Ajax.BeginForm("Submit", "myController", new AjaxOptions { HttpMethod = "Post" }))
{ %>
<button type="submit" name="submitType" value="submit_a">a</button>
<button type="submit" name="submitType" value="submit_b">b</button>
<% } %>
The controller method is as follows:
[Authorize, HandleError, HttpPost]
public ActionResult Submit(string submitType)
{
//placeholder
}
With IE (js on or off) the buttons post back with their respective submitType value, however with Chrome and FireFox submitType is null (when js is on, it's fine when js is off)
Does anyone know how I can fix this behaviour please?
(Please note I need to use the Ajax form as it does partial postbacks/updates)