关闭子页面刷新父页面中部分控件数据的方法_实用技巧

分享到:
Father
1.新建一个按钮

<asp:Button ID="btnFresh" runat="server" Text="" OnClick="btnFresh_Click" />

2.JS

<script type="text/javascript">
function btnFreshData() {
document.getElementById("btnFresh").click();
}
</script>

Son
1.cs

ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>window.opener.btnFreshData();window.open('','_self');window.close();</script>");
昵    称:
验证码: