//la finestra principale contiente una TextBox ed un LinkButton. La TextBox mostrer i dati provenienti dalla finestra pop-up e, il LinkButton 
//servir invece ad aprire la finestra pop-up

protected void Page_Load(object sender, EventArgs e) 
{
string openWindow = @"window.open('Child.aspx')";
this.LinkButton1.Attributes.Add("onclick", openWindow); 
}


//Anche la finestra pop-up contiene una TextBox ed un LinkButton
protected void Page_Load(object sender, EventArgs e) 
{
this.LinkButton1.Attributes.Add("onclick", "PassValues()");
}

//aggiungiamo del codice JavaScript
<script language=javascript> 
function PassValues() 
{
var txtValue = document.getElementById("TextBox1").value;
// Now pass the value to the Parent form 
window.opener.form1.txtUserName.value = txtValue; 
window.close();
}
</script>
