Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Thank's for all answers, comments. rates, and feedback. Just now I found a very helpful link <a href="http://wiki.asp.net/page.aspx/282/passing-value-from-popup-window-to-parent-form39s-textbox/." rel="nofollow">here</a>. Basically the answer is based on that particular code. I just need to alter some part.</p> <pre><code>&lt;script language="javascript"&gt; function GetRowValue(val) { window.opener.document.getElementById("ctl00_ContentPlaceHolder1_TextBox2").value = val; // make sure you change the TextBoxId as respective to your creation window.close(); } &lt;/script&gt; &lt;asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"&gt; &lt;Columns&gt; &lt;!-- Reserve the code below, as after you configure data source you --&gt; &lt;!-- will alter this code drastically therefore--&gt; &lt;!--you have to make sure to paste this code --&gt; &lt;!-- again inside this Gridview element once you configure your data source --&gt; &lt;asp:TemplateField&gt; &lt;AlternatingItemTemplate&gt; &lt;asp:Button ID="btnSelect" runat="server" Text="Select" /&gt; &lt;/AlternatingItemTemplate&gt; &lt;ItemTemplate&gt; &lt;asp:Button ID="btnSelect" runat="server" Text="Select" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;!-- This part must be reserved --&gt; &lt;/Columns&gt; </code></pre> <p></p> <p>Also remember to specify the connection string and the sql command in the datasource.</p> <p>The rest just follow that tutorial and copy paste the code entirely.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload