Wednesday 2 January 2013

Refresh Parent Page from Iframe


Refresh Parent Page from Iframe


You might have in the situation when you need to refresh the Parent from the Iframe on any event..
Here is the code to achieve this:

In Iframe aspx page, add this script function:


    <script language="javascript">
    function RefreshParent()
    {
    window.parent.location.href = window.parent.location.href;
    }
    </script>


Then Call this Javascript Function from the Code-Behind:


Page.RegisterStartupScript("RefreshParent","<script language='javascript'>RefreshParent()</script>");

No comments:

Post a Comment

Thank You for Your Comments. We will get back to you soon.

back to top