You cannot. JavaScript works on the client side, so there are no "calls" to it. Using Google, you will find many solutions of the problem, but you should understand that they don't "call" any script functions, the actually help to
create
them and make sure they are called. One convenient method of doing when the page is loaded so is using
ScriptManager.RegisterStartupScript
:
Call to javascript Function from code behind using ScriptManager.RegisterStartupScript[
^].
You can create scripts handling various events. No matter what you do, the whole page is generated on the server side and fully loaded on the client side and called in the browser. Before next HTTP request (including postbacks), client and server sides do not even communicate.
—SA