用javascript实现子页刷新父页的控件

来源:互联网 发布:能美图的拍照软件 编辑:程序博客网 时间:2024/06/05 13:40

 

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);

原创粉丝点击