If you're referring to an ASP.NET page, the C# is processed on the server, and the client-side Javascript has no access to it. If you want a function called on the client side, you need to rewrite your C# function as Javascript and include it that way.
Lee