There are methods in the "codebehind" -- I've only ever heard that term used for Windows servers -- that are not sent as javascript. So when you click a button, the browser does not have the code that will be executed. Which is exactly as I would expect.



"Code Behind" is just that - code that resides in a separate file that provides the functionality for a web page. Back in ancient times, you had (now called "classic") ASP pages that had the code and HTML all in a .asp file. MS changed that in the .Net framework so you could have code in a separate file outside of your page formatting, whether you had .aspx controls, HTML controls, or a mixture of both. Makes debugging exponentially easier.

Javascript: you can still have Javascript code embedded in your .aspx web pages, or you can have a 1 line Javascript subroutine call a Javascript subroutine or function stored in a separate library file containing all of your Javascript code. The choice is yours.