I have found a few people are looking for an example of this. Myself and others I know have had problems getting a page in a framset to redirect to the login page correctly. The problem was that the login page would load in the frame that called it rather than the entire browser itself.
I found a solution in the exact opposite place I was looking for. Put the following code into the login page itself.
Somewhere near the top of the page enter this script either manually or with the RegisterStartupScript method in your code behind.
[color green]
<SCRIPT LANGUAGE="javascript">
<!--
if (window.top != window.self)
{
window.top.location="login.aspx";
}
//-->
</SCRIPT>
[/color]
Hopefully this can save someone the hours it cost me.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.