title: How to post data to external site and get external site's action result from my controller's action ASP .Net MVC?
body: <p>I have some html form on my view which has to be posted to some external site:</p>
  
  <p><strong>Html form on my view</strong></p>
  
  <pre><code>&lt;form action="http:\\externalsite\external-site-action" method="POST"&gt;
      &lt;input type="text" name="parameter1" value="someValue1"/&gt;
      &lt;input type="text" name="parameter2" value="someValue1"/&gt;
  
      &lt;input type="submit" value="Submit to external site"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>When I post data to external-site-action this action redirects me to some other external site's page so I need user to be stayed there.</strong> But before this form is posted I have to perform some action/method in my controller, but this action is just making some changes in database, so I do not need any redirections or action results, otherwise user has to be redirected to external site page, data is posted to. How can I perform database changes in my action and make this form posted programatically to external site and redirect user to this external site (on the same browsers tab) in controllers action like below:</p>
  
  <pre><code>public ActionResult ChangeDBPostAndRedirectToExternal(string parameter1, string parameter2)
  {
      DoSomeDatabaseStuff();    
      PostParametersToExternalSiteAndRedirectUserToPageDataPostedTo();
  }
  </code></pre>
  
  <p>I tried Redirect() method, but this method cannot perform post action. So how can I post data via my controller's action to external action and get external action's view result with handled posted data? Or is there some wiser approach to achieve what I need? I have to <code>DoSomeDatabaseStuff();</code> before POST.</p>