title: Passing value from parent form to .NET control via javascript. Gridview Selectparameter from window.opener
body: <p>I have two asp.net forms.</p>
  
  <p>The first form opens a popup window to the second using onclick javascript as follows:</p>
  
  <pre><code>onclientclick="javascript:PS=window.open('https://site/PS.aspx','PS','width=800,height=600,scrollbars=1');PS.focus()"
  </code></pre>
  
  <p>the second form has a .net gridview with a SelectParameter.</p>
  
  <pre><code> &lt;SelectParameters&gt;
   &lt;asp:ControlParameter ControlID="???" Name="FirstName" DefaultValue="="  PropertyName="Text" Type="String" /&gt;
   &lt;/SelectParameters&gt;
   &lt;/asp:SqlDataSource&gt;
  </code></pre>
  
  <p>How can I set the value of the parameter to the value of control on the parent form? I don't want to use a session variable or a querystring if possible.</p>
  
  <p>Thanks.</p>