<script language="VB" runat=server>
     Sub Logout_Click(sender As Object, e As EventArgs)
     FormsAuthentication.SignOut()
     Response.Redirect("login.aspx")
     End Sub
</script>
我做的登录进入页面后,是三个框架,分别是top.aspx,left.aspx,main.aspx,在main.aspx里面有个注销按钮,用来注销登录的用户,我用response.redirect()传送的时候,跳不出框架,在注销后,页面仍然显示在main.aspx中,各位大虾帮一下,用什么方法来解决这个问题!
我是一个菜鸟,大虾详细一点,谢谢了!

解决方案 »

  1.   

    login.aspx加一段:
    <script>
    if(window.top != self)
    window.top.location=self.location
    </script>
      

  2.   

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30689: Statement cannot appear outside of a method body.Source Error:<script language="vb" runat="server">
    if (window.top!=self)
      window.top.location=self.location
      end if
     </script>
    出错提示