title: Changing mvc form controller on submit
body: <p>I recently came upon this question as I have a solution I need to work on.</p>
  
  <p>I have a controller which does some logic, with some method:</p>
  
  <pre><code>   public Controller1: MvcController
     {
       public ActionResult SomeLogic(Model model)
       {
         return view();
       }
       public ActionResult SomeLogic2(Model model)
       {
         return view();
       }
    }
  </code></pre>
  
  <p>And I have a second controller which does different logic:</p>
  
  <pre><code>   public Controller2: MvcController
     {
       public ActionResult SomeLogic(Model model)
       {
         return view();
       }
       public ActionResult SomeLogic2(Model model)
       {
         return view();
       }
    }
  </code></pre>
  
  <p>Both are working on the same view:</p>
  
  <pre><code>MyView.cshtml
  </code></pre>
  
  <p>The view contains a begin form that works on submit:</p>
  
  <pre><code>@using(Html.BeginForm("SomeLogic", "Controller1", FormMethod.Post)
  </code></pre>
  
  <p>and 4 submit buttons:</p>
  
  <pre><code>&lt;input type='submit' formaction='SomeLogic' value='submit' /&gt;
  &lt;input type='submit' formaction='SomeLogic2' value='submit2' /&gt;   
  &lt;input type='submit' formaction='SomeLogic' value='submit3' /&gt;
  &lt;input type='submit' formaction='SomeLogic2' value='submit4' /&gt;
  </code></pre>
  
  <p>I know I can control the action to which I am redirecting the submit using the:
  <code>formaction</code> attribute.</p>
  
  <p>I there a way to change the controller as well? meaning that: </p>
  
  <pre><code>&lt;input type='submit' formaction='SomeLogic' value='submit3' /&gt;
  &lt;input type='submit' formaction='SomeLogic2' value='submit4' /&gt;
  </code></pre>
  
  <p>Will submit to <code>controller2</code> instead of <code>Controller1</code> which is defined in my begin form.</p>
  
  <p>This will solve my debate whether to create a new controller or use the existing one, which is already full of complex logic. </p>