views:

27

answers:

1

So yeah, Im building a little authenticated content(.NET app) to a large html site managed by another group. They are only comfortable with managing html so all my app content will be contained in iframes. Everything is working fine as far as navigation and calling services and whatnot but i cant bust out of the frame with my asp:login control. Im trying to register some JS on logged in but with no success.

Thanks

protected void login_LoggedIn(object sender, EventArgs e)
    {
        StringBuilder strScript = new StringBuilder();
        strScript.Append("<script language='javascript'>");
        string sHome = ConfigurationManager.AppSettings["AppHomePageURL"].ToString();
        //strScript.AppendFormat("window.navigate('{0}');", sHome);
        //strScript.AppendFormat("parent.location.href='{0}';", sHome);
        //strScript.AppendFormat("window.open('{0}', '_top', '', false);", sHome);
        strScript.AppendFormat("top.location.href='{0}';", sHome);
        strScript.Append("WTF_let_me_outa_here();");

        strScript.Append("</script>");
        ClientScript.RegisterClientScriptBlock(typeof(Page), "LoginGO", strScript.ToString());
    }

progress: Any scripts I added from onloggedin would not run.. I had to make a redirect page to achieve my goal as per the link below. http://forums.asp.net/t/1420196.aspx

If there is a better way to do this I am still very interested. Thanks again

+1  A: 

check out this link. The code example seems to be what you are looking for: http://dotnet.itags.org/dotnet-security/39699/

Robot
I already implemented the intermediate redirect page, but I do like this method more.
jumpdart