asp.net - Passing value from popup window to parent form's TextBox -
work on asp.net visual studio 2008 c#. have page. page need call page on popup. on popup page selected value set on parent page text control.
- one parent page
- one child page.
- call parent child popup.
- on popup window contain grid.
- on popup grid have command select,click on select close popup , selected value set on parent page text control.
i have done steps 1,2,3 , 4. need complete step no 5.
on parent page:
<script type="text/javascript"> function f1() { window.open("child.aspx"); } </script> <asp:textbox id="textbox1" runat="server"></asp:textbox><input type="button" onclick="f1();" value="pop up" />
on child page:
<script type="text/javascript"> function f2() { opener.document.getelementbyid("textbox1").value = "hello world"; } </script> <input type="button" value="return hello world" onclick="f2();" />
also can pass id of control want fill child page parameter:
window.open("child.aspx?controlid=<%=textbox1.clientid %>");
Comments
Post a Comment