Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello guy's.
I have a Parent page in which i have few link buttons.
On click of one of the button i open a pop window which contains a grid view control which has product list.
In grid view i have a edit link button. On click of Edit i want the parent page to redirect to EditProduct.aspx with Product ID as a query string and close the popup window.
Can some one help me.
I am a very new to coding.
Thanks for your help.
Posted
Updated 18-Nov-19 23:21pm

You may want to investigate the window.parent[^] property. Assuming that the popup is actually a div with a higher z-order displaying contents from another page using an iframe; this will allow you to interact with the "parent" page.

Regards
Espen Harlinn
 
Share this answer
 
Comments
Albin Abel 17-May-11 6:20am    
Good Answer. My 5
Espen Harlinn 18-May-11 12:45pm    
Thank you Albin!
Espen Harlinn's solution should work if your popup is through a javascript. Alternatively you can use ASp.net Ajax control toolkit's modal popup and a button in there can be used to trigger postback or crosspage postback. If postback then in the button click event handler you can redirect to another page.

Good luck
 
Share this answer
 
Comments
Espen Harlinn 18-May-11 12:46pm    
Good suggestion, quite easy to implement - my 5
Albin Abel 19-May-11 4:56am    
Thanks Espen Harlinn
Have a look at this article. You can get enough info from it to move on: Partial update of parent page via AJAX (ASP.NET 2.0) on close of a child window - conditionally[^]

Instead of a postback on return, you need to navigate here.
 
Share this answer
 
Comments
ubaidh sayed 16-May-11 8:45am    
That Dint help me. :(
context.Response.Write("<script type='text/javascript'>window.frameElement.commitPopup()</script>");
context.Response.Flush();
context.Response.End();
 
Share this answer
 
Comments
Richard Deeming 19-Nov-19 13:33pm    
An unexplained code-dump is not a solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900