As a general approach?
Well, say we have this button on a web page, and we need to find that code?
Well, open up the page in design mode, and simple double click on that button.
It looks/works like this:
So, say we open the web page ScoreCards from visual studio:
Is that not amazing and simple?
This perhaps is one of the greatest features of web forms. The ability to open a UI, and click on a button to find that ONE code bit and button out of a 1000's of lines of code in a big application?
So, we looked at the running web site, and the URL. Then opened up that page in design view. Then a simple double click on the given button, and we are jumped to code behind.
Of course not all buttons and code will work with a simple double click as above shows. So, in above, we had a row click for the GridView. So, for that, I suggest changing the form design view to split.
So, now first click on the gridview, and then click on the button. It looks like this:
Once again, for a large application? Well, we are following the GUI, and thus in a way "traversing" the application right down to where we want to go.
In above, we thus see the OnClick event. So, we can right click, and now go view code.
Since I highlighted the onclick event, then that's in my paste buffer.
So, the right click sequence looks like this:
So, once again, we using "mostly" the GUI to navigate down to ONE bit of code, and this approach works for small, or large applications.
Unfortunately, all too many "new" development tools have obfuscated out how a simple button or page load works, and thus it becomes progressively difficult to navigate to code like above shows with web forms.
Regardless, with webforms you can easily drill down to one button or one bit of code, and even do so in a rather large application.
In summary:
Look at the URL, then open that aspx page in design mode.
You can then simple click on the control, or even double click on a button, and you wind up in the code behind (server side code) that runs for that given button, or control.
Often, for nested buttons (inside a gridview), then a simple click (single click) on the control in question should show up in the markup. From that you can use the 2nd approach above, and use view-code.
That still in a rather rapid fashion gets you to code behind.
Then ctrl-f to find. (so helps if you cut" the event for the button, then when in code behind, a ctrl-f gets yo to the code in question).