以下为页面一打开页面二的程序protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
                string str = this.GridView1.Rows[this.GridView1.SelectedIndex].Cells[1].Text;
        Response.Write("<script language='javascript'>window.open('OperatorDetail.aspx?OperatorId=" + str + "','Sample','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=700,height=550,left=150,top=100');</script>");    }我的问题是,页面二处理完数据后关闭后,页面一中的GRIDVIEW如何自动刷新,从而显示GRIDVIEW所绑定的数据原中表已更新的最新内容?

解决方案 »

  1.   

    ding yi xia, merry christmas to everyone
      

  2.   

    这个问题俺来回答吧,我打开的时候在脚本后面再加一句话" if(res=1) window.location='ticket.aspx';</script>"  在被打开的页面里面,就要想着返回Response.Write ("<script>window.returnValue=1;window.close();</script>");,这样关闭窗口. 不过我都是打开的模态窗口 window.showModalDialog
      

  3.   

    第二页加一链接<A onclick="javascript:window.close();window.opener.location.reload();return false;"
    href="#">关闭窗口</A>