1 Add the following code to .aspx
<script>
function fresh() {
{
window.opener.document.getElementById("ControlId").click(); //ControlId -- meaning parent control
}
<script>
2.Add the following code to .cs,if you want to refresh master page control.
ScriptManager.RegisterStartupScript(Page, Page.GetType(), Guid.NewGuid().ToString(), "fresh(');", true);
本文介绍了一种在子窗口中通过JavaScript调用父窗口的方法来触发父页面特定控件的点击事件,以此实现对父页面指定控件的刷新操作。这种方法适用于需要在弹出窗口或新标签页中操作后返回并更新父页面场景。

297

被折叠的 条评论
为什么被折叠?



