比如A.aspx里有个 button控件,它起刷新A.aspx的作用,B.aspx是它的一个弹出页面, 在B.aspx中进行了操作(比如是更新了A.aspx中GridView的数据)后点击关闭按钮后,B.aspx关闭,然后调用A.aspx的button控件的事件处理程序刷新A.aspx,请问该怎样实现  button事件如下
 protected void btnRefresh_Click(object sender, EventArgs e)
    {
        Response.Write(" <script>self.reload();</script>);
    }

解决方案 »

  1.   

    关闭了直接刷新就可以了吧,不用调用A.aspx的button控件的事件吧
      

  2.   

    我以前用过直接刷新的办法,比如在B.aspx里用opener.location.reload/opener.location.href=opener.location.href刷新,会有问题 所以想用这个办法 就请教该怎样做
      

  3.   

    document.getElementById("btnRefresh").click();
    这样试试
      

  4.   


    应该是opener.document.getElementById("btnRefresh").click();
      

  5.   

    谢谢 opener.document.getElementById("btnRefresh").click();是写在子页面还是父页面里?
      

  6.   

     window.parent.reload();  就可以了