我有一个页面,使用了frameset,定义了3个frame,同时页面使用了基于窗体的身份验证。
如果没有登录的话,页面会自动跳转到Login.aspx,现在的问题是,如果没有登录的话,3个frame都会跳转到Login.aspx,这样一个页面就出现了3个Login.aspx的页面,请问应该如何设置?

解决方案 »

  1.   

    if(没有登录)
    {
    Response.Write("top.window.location.href='login.aspx';");
    }
      

  2.   

    document.frames['mainFrame'].location=""
      

  3.   

    打开的:
    <Script language='JavaScript'>
    var iWidth = 0;
    var iHeight = 0;
    iWidth=window.screen.availWidth-10;
    iHeight=window.screen.availHeight-50;
    var szFeatures ='width=' + iWidth + ',height=' + iHeight + ',top=0,left=0,location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,titlebar=no,toolbar=yes,directories=no';
    window.open('你跳转的路径','',szFeatures);
    </Script>关闭的:
    <Script language='JavaScript'>window.parent.opener=null;window.parent.close(); </Script>
      

  4.   

    Response.Write("top.window.location.href='login.aspx';");
      

  5.   

    1、loginUrl="Redirect.html"2、Redirect.html
    ...
    <head>
    <script language="javascript">
    <!--
    top.location.href = "Login.aspx";
    //-->
    </script>
    </head>
    ...
      

  6.   

    luck0235(风平浪静时人人都能掌舵) 
    =======================你的方法会出现死循环
      

  7.   

    先关闭框架,再转跳
    Response.Write("<script>top.opener=null;window.top.close()</script>");
    Response.Write("<script>window.open(\"http://localhost/MBO/default.aspx\")</script>");或者如上:
    Response.Write("top.window.location.href='login.aspx';");总之操作时要top