HttpContext context = HttpContext.Current;
if (HttpContext.Current.Request.QueryString["IsDlg"] != null)
{
context.Response.Write("<script type='text/javascript'>window.frameElement.commitPopup();window.top.location.replace(" + pageURl+ ");</script>");
context.Response.Flush();
context.Response.End();
// context.Response.Write("<script type='text/javascript'>window.location='"+pageURl+"';</script>");
}
if (HttpContext.Current.Request.QueryString["IsDlg"] != null)
{
context.Response.Write("<script type='text/javascript'>window.frameElement.commitPopup();window.top.location.replace(" + pageURl+ ");</script>");
context.Response.Flush();
context.Response.End();
// context.Response.Write("<script type='text/javascript'>window.location='"+pageURl+"';</script>");
}
commitPopup() --> Works fine.
window.top.location.replace --> Not working
Pleaw let me know how to solve?