title: Redirect to parent via iFrame from MVC Action using javascript
body: <p>I have a MVC form in an iFrame on a Webforms site. The form submits via the following code but I would like it to redirect to the parent page on the Webforms site. It doesn’t work as I can’t get RedirectResult to target the parent. From what I have learnt in the past is that it can’t be done?</p>
  
  <pre><code>[HttpPost]
  public ActionResult Index(string FindText, string FindTown)
  {
      return new RedirectResult("http://www.thesite.com/SearchResults.aspx?SearchText=" + SearchText + "&amp;Town=" + Town);
  }
  </code></pre>
  
  <p>Is there a way I can target the parent via Javascript from inside the Action to achieve the result I would like?</p>
  
  <p>e.g.. using,</p>
  
  <pre><code>window.parent.location.href
  </code></pre>
  
  <p>if this is possible how would I write it?</p>