Wednesday 15 January 2014

javascript - how to reload an aspx page within an iframe when click event triggers from the control within an iframe -


I have a webpage in which I have an iframe and I am loading a different webpage [aspx] in it Say wb2.aspx Add a comment to the Wb2.aspx name button. When a button is clicked, a model popup will appear and it accepts some value and stores it in the database. I am displaying comment in wb2.aspx. Now my intention should be to refresh the page soon after the comments and the new entry should appear. How can I do this?

After the long search I found this answer. string Script = "this.window.parent.location = this.window.parent.location; this.window.close ();"; If (! ClientScript.IsClientScriptBlockRegistered ("REFRESH_PARENT")) ClientScript.RegisterClientScriptBlock (typef (string), "REFRESH_PARENT", script, true);

No comments:

Post a Comment