本文介绍了将子项弹出文本框值发布到gridview中的文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞!Hi, I am not sure if this can be done, I have searched many posts but can't find exactly what I am looking for, first trying this. I know I can post values from a textbox from a pop up to a textbox on a parent page. If I have a gridview on the parent page with a textbox in the footer. When I enter information into the popup textbox, is it possible for that value to get posted into the gridview's footer textbox on the parent page? If this is possible how can I achieve this? My code is below:Parent gridview:<asp:GridView ID="ProductsInCategory" runat="server" ShowFooter="True"AutoGenerateColumns="False"ShowHeaderWhenEmpty="True" DataSourceID="SqlDataSource1"><Columns><asp:BoundField DataField="name"HeaderText="stock_name" SortExpression="name"></asp:BoundField><asp:BoundField DataField="id"HeaderText="isin" SortExpression="id"></asp:BoundField><asp:TemplateField><FooterTemplate><asp:Label ID="lblShipping" runat="server" Text="Shipping" /><asp:TextBox ID="txtShipping" runat="server" /></FooterTemplate></asp:TemplateField></Columns></asp:GridView><asp:SqlDataSource ID="SqlDataSource1" runat="server"ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" SelectCommand="SELECT * FROM Test_tbl"></asp:SqlDataSource>Child:<head runat="server"><title></title><script type="text/javascript">window.history.forward(1);function f2() {opener.document.getElementById("TextBox2").value = document.getElementById('<%=txtNotes.ClientID%>').value;opener.document.getElementById("txtShipping").value = document.getElementById('<%=txtNotes.ClientID%>').value;window.close();}// function f2() {// opener.document.getElementById("lblID").value = document.getElementById('<%=txtNotes.ClientID%>').value;// window.close();// }</script></head><body><form id="form1" runat="server"><div><asp:Button ID="cmdSave" runat="server" onclick="cmdSave_Click" Text="Save" /><input type="button" value="close" onclick="f2();" /><br /><br /><asp:TextBox ID="txtNotes" runat="server" Height="140px" TextMode="MultiLine"Width="240px"></asp:TextBox></div></form></body>推荐答案 这篇关于将子项弹出文本框值发布到gridview中的文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-24 03:09