Visual Studio programmers will be glad to hear that Microsoft has done a great job of making the techniques that work in Windows forms event subroutines also work in Web forms. For example, the same sender and e parameters work the same way and the Handles clause does too.
For example, consider the simple website with three buttons and a label shown below:
--------
Click Here to display the illustration
Click the Back button on your browser to return
--------
The following code shows how a common subroutine can handle all three buttons using the Handles clause and the Sender parameter.
Protected Sub Button_Click( _
ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click, Button2.Click, Button3.Click
Label1.Text = sender.Text
End Sub
The Button control doesn't pass anything using the e parameter but other controls do. For example, the ImageButton control passes the X and Y coordinates. It's necessary to check the documentation of the control to find out what might be passed.

