Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
I frequently place an UpdatePanel around a paged GridView with inline editing. During OnRowUpdating, the object is saved. If the save was not successful, I like to show an alert box with the error message.
I recently migrated from the Atlas May CTP to ASP.NET 2.0 AJAX. The following code worked with the May CTP, but, from my research, has not worked since July CTP:
Page.ClientScript.RegisterStartupScript(typeof(string), "alertScript", "alert('Error Message');", true);
However, our pals at Microsoft have given us something just as good. I found it by mistake while trying to put in a hack involving checking the value of ScriptManager.GetCurrent(Page).IsInAsyncPostBack. Here is the AJAX-friendly equivalent:
ScriptManager.RegisterStartupScript(this.updatePanel, typeof(string), "alertScript", "alert('Error Message');", true);
ScriptManager
Hope this helps someone. There are many blog posts, with many more comments, with people compaining about this.
Remember Me
a@href@title, strike