The reason that your page isn't working is order of execution. ASP gets parsed by ASP.dll first before anything else happens. Then the server builds an HTTP response and sends it back to the browser. Because that is the order of things, you can not execute ASP code as part of an event handler. It just won't work.
If you need to make the event trigger an ASP function, you will have to submit the page, or find some other solution. A really common development technique it to have every page submit to its self. You name all of your submit buttons the same thing and then you check the value at the top of the page.
At the top of your page:
An alternative solution is to have your ASP write your javascript function. This works well if you need to get a value from your ASP page for use in client script, but that value is not likely to change while the page is loaded. For example, if I wanted to pop and alert dialog box with my customer's name, I could do something like this:
HTH