In this hour we saw how to have the Button Web control's Click event associated with an event handler provided in the source code section. One way to accomplish this is by simply double-clicking the Button Web control in the Design view. This causes Visual Web Developer to inject some code into the page's source code portion. For the Button Web control, a Click event handler is added.
However, a Web control may have a number of different events, meaning we can, potentially, have numerous event handlers in our ASP.NET page's source code. Each Web control has a default event. When the Web control is double-clicked in the designer, an event handler is created for this default event. (Note that the Button Web control's default event is the Click event.)
Adding an event handler for an event other than a Web control's default event requires that you go directly to the source code portion and pick the Web control and event from the two drop-down lists at the top. This is a technique we discussed briefly in both this hour and in Hour 2.