在一个窗体上有个按纽,点击进入另一个窗体原来的窗体关闭怎么写代码啊,谢谢大家

解决方案 »

  1.   

    Page.RegisterStartupScript("test", "<script language='javascript'>window.open('新打开的页面');window.opener=null;window.close();</script>")
      

  2.   

    C#
    在Button click 事件中添加this.Response.Redirect( "新的页面" );
      

  3.   

    对不起我没说明白我说的是在windows窗体上
      

  4.   

    Form2 f2=new Form2();
    f2.Show();
    this.Close();
      

  5.   

    当然,如果你要关闭的是主窗体的话,就不能那样写。。
    应该把主窗体隐藏了。。
    this.Visible=false;