I am answering this to shed more light for those who are new to this cilent-side and server-side scripting and mix up when doing some interesting work to them :)
This is absolutely impossible to call a Javascript (client-side) function from within C# (server-side) code. I mean, even you really cant invoke a javascript back into the server-side code in any programming language on earth!
It is very simple. Server-Side code renders the client-side code. Since the client code (html/javascript) resides in the browser you don't have any hook for javascripts at least to get it in server-side and then invoke. But for Asp.Net provides you a hook that actually transforms client-side HTML controls (most HTML tags) into server-side controls (as the .net framework supports) and then you can access their properties and some methods which only invoke at server-side. It does not mean that you have javascript events or such. Whatever you do with those server-side controls HAPPEN only at server-side and everything with that is COMPLETED before the final code of THAT control is sent to the browser to render. That is why when the html of such controls is rendered you see a typical .net based ID generation which looks like _ctr01 and such.
Anyway, using Ajax (at client-side) you can still invoke server-side methods using Ajax.Net and/or Ajaxpro (ajaxpro.info) or a custom javascript lib (jquery).
I hope this helps only in understanding what you are doing is actually NOT possible. I still would not rate your question negative as it is really going to help many new comers to understand how things work and how people who have gone through this got it right.
I hope its very fair use of this forum to provide the information that helps everybody rather negating their points without letting them know what they are asking/answering is right/wrong.
Thanks a lot.