I have button onSearch.aspx page. when user clicks on that button a new window appears
using following javascript
function GotoSelectProgram(memberid)
{
var url2 = "SelectProgram.aspx?MID="+memberid;
str = window.showModalDialog(url2);
}
the above script will create new window for SelectProgram.aspx page. This new page has
datagrid with few rows. and each row has ImageButton called Select. when user select any row
i want to close that popup window and parent window should navigate to ProgramUpdate.aspx
im using following c# code in click event of select button
private void MemberDetails1_SelectorChanged(object sender, ProgramEventArgs e)
{
// some code here
Response.Write("<script language='javascript'>window.close();window.opener.location.href = 'ProgramUpdate.aspx'</script>");
}
the above code works fine if i use window.open instead of window.showModalDialog.
but if i use window.showModalDialog, when user clicks on select, control goes to ProgramUpdate.aspx page as i wanted but
parent window still shows Search.aspx and Popup window is still there, it wont get closed.