How can I execute javascript from the server when using asp:UpdatePanels?
-
03-07-2019 - |
Question
I used to do the following to execute javascript from the server:
Page.ClientScript.RegisterStartupScript( ... );
And it would execute when the page loads back at the client. I am now modifing existing pages to use UpdatePanels
and my javascript is no longer being fired.
Solution
AFAIR, you should use ScriptManager
's RegisterStartupScript
method. For details see MSDN
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow