You can do that using Javascript
For example i have a Button and when button click i open popup and return the data to main page.
For the Button client click event i have used this in page init method
Here i call the javascript method in onclick client event and also i pass the text box to the java script function to display back the popup result.
imgTool.Attributes.Add("onclick", string.Format("popupOpen({0})", txtbox1.ClientID));
This is javascript code which you can add in your main page and this scriipt will a popop window.kindly change the page name to your popup aspx window.
function popupOpen(textbox_id) {
if (project_id.disabled || project_id.getAttribute('ReadOnly')) return false;
var res = ShowPopup("popUpPage.aspx?project_id=" + project_id.value, 820, 551);
if (!!res) {
textbox.value = res[0];
}
}
In you Popup Page you can have close Button and in Close Button Click.pass the result which need to be display in your main page.
protected void btnConfirm_Click(object sender, ImageClickEventArgs e)
{
SelectConfirm("Shanu");
}
protected void SelectConfirm(yourreturnvalue)
{
Response.Write("<script language='javascript'>");
Response.Write("window.returnValue = new Array('" +
yourreturnvalue + "');window.close();");
Response.Write("</script>");
}