贤人必须成人,成人才能达己.

共同进步

  :: :: 博问 :: 闪存 :: 新随笔 :: :: :: 管理 ::

父窗口弹出子窗口的 button处理事件:

       private void butDeta_Click(object sender, System.EventArgs e)
        {
            Response.Write("<script>window.open('CangkuDetaList.aspx?strMateNo="+ txtMateNo.Text +"&strWaretype="+ ddlWareType.SelectedValue +"','new1','width=750,height=400,toolbar=0,scrollbars=2,top=200,left=200');</script>");
        }
or

 protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Write("<script>window.open('Popup.aspx','_blank','height=450,width=470,status=no,toolbar=no,menubar=no,scrollbars=no,location=no');</script>");
    }

父窗口html代码添加如下javascript代码:
function refresh()
{
    this.location = this.location;
}
子窗口关闭窗口的 button处理事件:
        private void imgbtnBack_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            Response.Write("<script>window.opener.refresh();window.opener=null;window.close();</script>");       
        }



posted on 2008-07-18 20:10  adi  阅读(2439)  评论(0编辑  收藏  举报