This is kind of a weird problem, but I have to create a search box for our site that will be iframed on another site. When the user clicks the search button, it needs to redirect the parent frame to our search results page.
At the moment what I've done is to make the search button a postback trigger then registering a client script block to run this:
if (window.parent) window.parent.location.href='<url>';
This is ok, but it seems like a hack & it means if the user clicks back on the browser after searching, it redirects them back to the search results page.
Is there a better way of doing this?