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?
[HttpPost]
public ActionResult Index(string FindText, string FindTown)
{
return new RedirectResult("http://www.thesite.com/SearchResults.aspx?SearchText=" + SearchText + "&Town=" + Town);
}
Is there a way I can target the parent via Javascript from inside the Action to achieve the result I would like?
e.g.. using,
window.parent.location.href
if this is possible how would I write it?