No, not exactly, .NET code is not on the client side, to do what you want, you must do what bmains has said and use Ajax, basically, you call your asp.net function via Ajax, and retrieve its return value/data.
.NET Developer @
http://www.3mushrooms.com