You've probably used ClientScript.RegisterStartupScript in your SharePoint application page and it works just fine.
for example:-
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Close", "<script type=\"text/javascript\">SP.UI.ModalDialog.commonModalDialogClose(0);</script>");
However, if you try it within an UpdatePanel control, you would notice that it simply doesn't execute.
The solution to this problem is to use ScriptManager.RegisterStartupScript instead. You can call it like so:
The solution to this problem is to use ScriptManager.RegisterStartupScript instead. You can call it like so:
ScriptManager.RegisterClientScriptBlock(UpdatePanelSites, UpdatePanelSites.GetType(), "Close", "SP.UI.ModalDialog.commonModalDialogClose(0);", true);