ASP.NET - Register Startup Script from a postback inside an update panel.
Posted on 2011-10-20
I have a situation where I have a button inside of an update panel. When the button is clicked it triggers a partial page postback. In the code behind of that partial page postback I am trying to register a client startup script based on logic that is running in the server side click event. The code I'm trying to use to do this is...
ClientScript.RegisterStartupScript(this.GetType(), "Displayt36SaveDetailsCompleteMessage", "Displayt36SaveDetailsCompleteMessage();", true);
But when the partial page postback completes, this code is not being run. Is there a way I can register a script in the code behind of a partial page postback of an update panel and have that script run as soon as the update panel finishes the postback?