Click here to Skip to main content
15,921,203 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hi,

I have a Link in my page.On click of which one pop up window opens up.
in that window i havea grid.i get the value of the selected row from the user and then this value is shown in the preivious page in a taxt box which has the link.
Now my problem is the pop up window only opens once.and also the value from the gridview is not easyily recieved.

What whud i do??

Regards,
Amol
Posted

This article should help you:
Partial update of parent page via AJAX (ASP.NET 2.0) on close of a child window - conditionally[^]

You need to update parent page from child page using Javascript.
 
Share this answer
 
Amol,

If possible why don't you create a user control instead of the popup. And show the control using styles (position:absolute) to float the control and on the click event of the grid set the original page textbox, using the code like -

C#
((TextBox)Page.FindControl("textbox1")).Text = "your value";


And also if you don't want the control, and want to use the window. There may be issue with the window instance name, change the window instance name each time you open a new window. Like manipulate and use different value for 'winname' in
JavaScript
winname = "win"+<some unique of your own logic>;
window.open(url,winname);


And use the opener.document.getElementById() method in the child window to set the parent window fields.
 
Share this answer
 

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