You have a good answer. If you going to pass the button value say to client js, or need a referance when using a master page, then you might need/want the client id.
But, if just looking for the id, then btn.ID will work, so this:
Protected Sub gb_Click(sender As Object, e As ImageClickEventArgs) Handles gb.Click, de.Click, hr.Click, cz.Click
Dim Btn As ImageButton = sender
Debug.Print("ID of button = " & Btn.ID)
Debug.Print("ID of button = " & Btn.ClientID)
Debug.Print("image url = " & Btn.ImageUrl)
End Sub
So, in some cases, you might need/want to use client id if the control is used for anything more then just some case or if/then to act for each button clicked.
Regards,
Albert D. Kallal (Access MVP 2003-2017)
Edmonton, Alberta Canada