Ok, i understand title is not very clear. I'll explain better now:
I have an iframe with asp.net page inside. To redirect parent from the iframe i use this:
ClientScript.RegisterStartupScript(Me.GetType(), "redirector", "window.parent.location.href='myOtherPage.aspx'", True)
It works fine, perfect on Internet Explorer and Chrome, crappy on firefox and opera. In those two browsers user can see single iframe reloading before the parent reloads, but thats not the problem i want to solve.
After a redirect if i hit the Back button on my browser i go back in the old page and bounced forward again. Hitting back again works (with Chrome). With Internet Explorer no problem, just 1 back works fine. Firefox and opera bounces me endless times!
I tried to erase the script after execution, so i used this (without any newline):
ClientScript.RegisterStartupScript(Me.GetType(), "redirector",
"<script id=""redirector"">
document.getElementById('redirector').innerHTML = '';
window.parent.location.href='myOtherPage.aspx';
</script>", False)
but its useless. Redirect still works but same two back button problem.
Any idea on this?