popup window code
<p>i have 2 aspax page.
client.aspx
popup.aspx</p>

<p>client.aspx contains a simple registration form. in this form i have to take one of the textbox value from popup.aspx. that textbox contains with a search button</p>

<p>when i click on search button popup.aspx page is opened in a popup window.</p>

<p>in popup.aspx i m showing a grid contains productCode and product name and a select button.
when i select a row of grid then corresponding product name should be displyed in textbox. and tht popup window should be closed.</p>

<p><strong>Update</strong></p>

<pre><code>    ImageButton imgbut = sender as ImageButton; 
    GridViewRow gvr = (GridViewRow)imgbut.NamingContainer; 
    lblKeyIndex.Text =  grd_ProductMaster.DataKeys[gvr.RowIndex].Value.ToString(); 
    lblProductName.Text = gvr.Cells[2].Text; 
    Session["ProdName"] = lblProductName.Text;
    Server.Transfer("client_Master.aspx");
    Response.Write("&lt;Script&gt;window.close()&lt;/Script&gt;");       Response.Redirect("client_Master.aspx?ProdName=" +        lblProductName.Text+"&amp;ProdCode="+lblKeyIndex.Text)
</code></pre>

<p>on page load of client.aspx </p>

<pre><code>if (Session["ProdName"] != null) 
{ 
 txtSelectProdName.Text = Session["ProdName"].ToString();
} 
</code></pre>
