I have a page where list of items is showing in gridview, another page to add/update items, this add/update page is opening in iframe as modal popup from parent page (client side). On this page i can add multiple items (server side code), and to see added items i m reloading the parent page using a javascript function.
- function reloadParent() {
- parent.window.location.reload();
- }
- script>
After saving data i m attaching this javascript function as below.
- ScriptManager.RegisterStartupScript(Page, typeof(Page), "test", "reloadParent();", true);
All is working fine as expected, but the problem is that before opening the modal popup, i delete an item from gridview (server side by gridview rowcommand event), and then i
open modal popup to add more item. After adding the item when parent page is reloading
then delete code (written in gridview rowcommand event ) is firing again, and a record is
being deleted, i.e. if I add 5 record then 5 record is added in database, but when parent
page is reloading then, last server event ( delete ) is firing again.
how to restrict last server event to fire when parent page is reloading from child page.