Tuesday, 4 November 2014

Refresh parent window on close of child window in asp.net

Code to refresh parent window on close of child window.

Put the below code in <head> tag of aspx page of child window.

<script type="text/jscript">
        window.onunload = refreshParent;
        function refreshParent() {
            var loc = window.opener.location;
            window.opener.location = loc;
        }
</script>

2 comments:

  1. Good job Mayank. You have extensive skills in Asp.net and C#.

    ReplyDelete
  2. Good job Mayank. You have extensive skills in Asp.net and C#.

    ReplyDelete