I was work around an issue. In an aspx page i am rendering an iframe content and printing the html content in the client browser (where the iframe is hidden in the same page). The reason is to control the page whether it is executed properly o(after all exception handling!!...huh!! ) or not. If the page displays any exception, i can easily check the document.body.innerHTML and avoid showing the page (I can show some error page instead).
The issue was, i had to use a asp:Button control which Response.Redirect to the another page. But, since the __doPostBack calls are forwarded to IFRAME the response goes to IFRAME, instead of going to the client browser.
The solution was, i added the below javascript in the Response.Redirect(ed) page. It worked fine.
window.onload = function() {
if ( top && top.location != window.location ) {
top.location = self.location;
};Thanks to Kapil, my co-worker who helped me in this.