title: Redirect to a Action with Post method in MVC
body: <p>I have two submit button in a form , one to search records corresponding a name , second one is to update that record in DB after doing correction if required.</p>
  
  <p>Three action in controller <br></p>
  
  <ol>
  <li>Edit with <code>HttpGet</code>-- when first time view display it load all the name from DB to a dropdownlist</li>
  <li>Edit with <code>HttpPost</code>-- When we click search it fetch every detail of that name</li>
  <li>EditPerson <code>HttpPost</code>-- When we click Edit record It save All the Data Back to DB</li>
  </ol>
  
  <p>In code I wanna do this </p>
  
  <pre><code>public ActionResult EditOperation(string Command, DataLayer objmodel)
  {
      if (Command == "Search")
      {
          return RedirectToAction(Edit with Post method) // How to ? always going to Edit With get method
      }
      else if (Command == "Edit Record")
      {
          return RedirectToAction(EditPerson) //Easy to redirect but How to send Model object also ?
      }
      return View("Edit",objmodel);
  }
  RedirectToAction (String ActionName, String ControllerName , Object routeValues)
  </code></pre>
  
  <p>Is There any way to tell the complier that redirect to Edit Action but the one who have Post method not the Get ?<br>
  Note : Dont wanna use Javascript here , only pure c# code</p>