父窗口弹出子窗口的 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>");
{
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代码:
父窗口html代码添加如下javascript代码:
function refresh()
{
this.location = this.location;
}
子窗口关闭窗口的 button处理事件:
{
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>");
}
{
Response.Write("<script>window.opener.refresh();window.opener=null;window.close();</script>");
}