Friday, January 15, 2010

Run (Execute) client script after an AJAX operation using Updatepanel

If there is a need to run a client script after an AJAX operation through UpdatePanel, use ScriptManager.RegisterStartupScript OR ScriptManager.RegisterClientScriptBlock. A typical usage is as follows.

ScriptManager.RegisterStartupScript(this, this.GetType(), "scriptname", "alert('update panel loading complete')", true);

Watch out, as some of these calls are getting deprecated

Additional Info:
http://fredrik.nsquared2.com/ViewPost.aspx?PostId=430