Monday, October 06, 2008

Navigate the parent page from the IFrame page (child page)

When user clicks the link/button on a page inside the IFrame, it will bring up another page inside the IFrame and the parent page will not change.

Sometimes we do need the link/button on the Iframe page update the parent page. Here is how to do it.

If the link is used, make the target property "_top".

If the button is used, in the code-behind, do this:
Response.Write("<" + "script>" + "'http://webpage_address','_top');<" + (char)47 + "script>");

No comments: