Redirect to the top window on server side
From the server side, redirecting the top window to a new location is generally not possible.
However, we can use Javascript to get the results we want.
Option 1 (using register startup script):
this.ClientScript.RegisterStartupScript( this.GetType(), "RedirectTopWindow", "window.open('/PageName.aspx','_top');", true);
Option 2 (using Response.Write):
this.Response.Write("<script>window.open('PageName.aspx','_top');</script>");