Correct. You can't run C# code on the client in place of JS code.
>
>below what I had (the latest update).. but html button ("commit") still not fired when it clicked?
>
Are you sure it's not being called? Set a breakpoint on the string txtuserid line (in the ASPX page click on the left margin - a red dot will appear) then run the page and try it.
Did you remove the predefined HTML (the body/form stuff) from your master page? Generally the IDE will create 2 sections - one content area is meant for just the HTML that appears in the HEAD section, the other content area is meant for your embedded HTML (and it already has the body/form sections in it). If you didn't remove the other HTML code it's possible that's tripping things up.