Usually it will either have an OnButtonClick="someMethod" in the asp.net page (for web) or form (for application), or in the code behind you will have something like this
this.btnMyButton.Click += new System.EventHandler(someMethod);
And you can look at the method to see what it is doing.
Or, are you looking for something different? Such as reflection to see what is on the button?