首先运行登陆界面,登陆成功后会重新弹出一个主页面,然后我想在主页面加载的时候,关闭登陆页面,如何实现?

解决方案 »

  1.   

    Response.Redirect("main.aspx", true);
      

  2.   

    页面跳转?if(true)//登录成功
    {
      Response.Redirect("Default.aspx");
    }
      

  3.   

    Response.Redirect("xxx.aspx"); 
    自动关闭原先页面的
      

  4.   

    你用的弹出不是后台代码写的??
    从后台的话就直接先弹出页面,然后this.Close();关闭当前页,应该就可以了;
      

  5.   

    window.opener = null;
    window.open(url);
    window.close();
      

  6.   

    直接跳转就行了不用新开页Response.Redirect("main.aspx");

    Response.Write("<script>window.location.href='main.aspx'</script>");如果非要开一个页在关闭主页的话,在打开的页写
    Response.Write("<script>window.opener.close()</script>");或者在登录页写7楼那代码