You cannot "call" it, because Javascript works on the client side; and the code-behind is on the server side. Nothing happens on the server side until you send some HTTP request. So, you can get some data from the server side only if you send HTTP request and receive some HTTP response. From your Javascript function, you cannot use the Web form (which you may not have), so the only way to send such request if Ajax:
http://en.wikipedia.org/wiki/Ajax_(programming)[
^].
One convenient way to use Ajax is using jQuery Ajax:
http://api.jquery.com/jquery.ajax[
^].
—SA