I wanted to implement such a simple function, but it took me a long time. The reason is that this is my first time using asp.net ajax, and I originally didn't want to use MS. But I want to see what his frame is like.
Using Response.write (js) will cause errors. After looking at some documents, it turns out that the static method RegisterStartupScript of ScriptManager needs to be used to implement the call. I don't know why the instance type does not provide this method. It cost me a lot of time.
ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "updateScript", "alert('save successfully')", true);
It seems that I need to study it carefully when I have time in the future. But now I feel I have less and less energy to learn these technologies. Hey, people are getting old. It’s useless.