I know that this has been asked multiple times. But so far I have not found a working solution.
I have the following code in a view:
@using (Html.BeginForm("RoleEdit", "AccountRoles", FormMethod.Post, new { id = "updaterole" }))
{
    <button name="mySubmit" formaction="@Url.Action("SetDefaultRole", "AccountRoles")" value="MakeDefault" class="button small">Make Default</button>
    ...
    other code
    ...
    <button type="submit" class="button small" value="save" name="save" id="save">@Resources.DashBoardTags.UpdateRoleTag</button>
}
And in the controller:
   [HttpPost]
    public ActionResult SetDefaultRole()
    {
        return View();
    }
and:
    [HttpPost]
    public ActionResult RoleEdit(List<UserRole> userRole, string mySubmit)
    {
        if (mySubmit == "Save Draft")
        {
            //save draft code here
        }
        else if (mySubmit == "Publish")
        {
            //publish code here
        }
     }
When the code executes:
- When clicking on the first submit button it ignores the SetDefaultRole function and executes the RoleEdit function. 
- The RoleEdit function value mySubmit is null. 
Please show my the error of my ways !!!!
I have looked at the proposed solution: Proposed Solution
From this I have created an attribute extension called MultipleButton and changed my code so that the the code now looks like this:
View:
@using (Html.BeginForm("RoleEdit", "AccountRoles", FormMethod.Post, new { id = "updaterole" }))
{
   <button value="SetDefaultRole" name="action:SetDefaultRole" class="button small" formmethod="post">Make Default</button>
    ...
    other code
    ...
    <button value="RoleEdit" name="mySubmit:RoleEdit" class="button small" formmethod="post">@Resources.DashBoardTags.UpdateRoleTag</button>
}
Controller
    [HttpPost]
    [MultipleButton(Name= "action", Argument = "SetDefaultRole")]
    public ActionResult SetDefaultRole()
    {
        return View();
    }
    [HttpPost]
    [MultipleButton(Name = "action", Argument = "RoleEdit")]
    public ActionResult RoleEdit(List<UserRole> userRole)
    {
        return View();
    }
Within the new extension, MultipleButtonAttribute shown in the Proposed Solution link above, is executed, the following line of code always returns a null value:
controllerContext.Controller.ControllerContext.RouteData.Values[Name] = Argument;
Can anyone help.
 
     
    