private void Button2_Click(object sender, System.EventArgs e)
{
   Response.Write("<script>window.parent.close();window.open('../login.aspx')</script>");

}
我点button退出框架时,跳出对话框,我选否后他还是跳转到login.aspx

解决方案 »

  1.   

    把框架关掉,然后跳到login.aspx
      

  2.   

    Response.Write("<script>top.location='../login.aspx'</script>");不明白你要什么结果
      

  3.   

    Response.Write("<script>window.top.location='login.aspx';</script>");
      

  4.   

    Response.Write("<script>window.open('../login.aspx');window.parent.close();return(false);</script>");
      

  5.   

    其实直接转就是了
    Response.Write("<script>top.location.href='../login.aspx';return(false);</script>");
      

  6.   

    我的框架里有top,left,right三个部分
    我在left.aspx里点退出,关掉整个框架,然后跳到登陆页面
    请问怎么实现,上面的代码我网上找的,有其他的实现方式吗
      

  7.   

    Response.Write("<script>window.open('../login.aspx');window.parent.close();</script>");
    直接用楼上兄弟的方法不是就可以了吗?
      

  8.   

    不用先关再开呀有点死心眼:)你把框架页直接转到登陆页,效果不也一样吗???Response.Write("<script>window.top.location='login.aspx';</script>");
      

  9.   

    新建一个页面:exit.aspx   将按钮指向exit.aspx在新页面的Page_Load里加入:Response.Redirect("login.aspx")