I think this is the best way for that as DevSupport mentioned. You must be write a java script like below:
//This function will close the pop window
function ClosePopWindow() {
var paentWin = window.parent;
window.parent.PopWindow.Hide();
}
And
//This function will clear inside content of pop window
function ClearPopWindow() {
var paentWin = window.parent;
paentWin.PopWindow.SetContentHtml(null);
}
and then call it from code behind when you need (after all of process you want to do) like this:
Page.ClientScript.RegisterStartupScript(GetType(), "script", "ClosePopWindow();", true);
or if you want to clear content you can use second function. Attention the PopWindow
is ClientInstanceName
of ASPxPopupControl
. This approach will work in any situation for example when pop window defined in Master page and content URL is a window without master page because it try to get parent window in final html elements in browser.
You can read a Dev Support answer at this: https://www.devexpress.com/Support/Center/Question/Details/B199294
And from ASP.NET Forums, Terry Guo answer at this:
http://forums.asp.net/t/1990775.aspx?How+to+close+the+popup+from+the+popup+containing+page+
Hope this help.