To close a dialog box from code behind you can use
this.Page.Response.Clear();
if (succes)
{
this.Page.Response.Write("<script type=\"text/javascript\">window.frameElement.commonModalDialogClose(1, 'saved');</script>");
}
else
{
this.Page.Response.Write("<script type=\"text/javascript\">window.frameElement.commonModalDialogClose(0, 'cancelled');</script>");
}
this.Page.Response.End();
No comments:
Post a Comment