veramente a me funziona. Ti mando l'esempio che ho fatto.
codice:
<asp:imagebutton id="ImageButton1" runat="server" CommandName="comand1"></asp:imagebutton>
<asp:ImageButton id="ImageButton2" runat="server" CommandName="comand2"></asp:ImageButton>
<asp:ImageButton id="ImageButton3" runat="server" CommandName="comand3"></asp:ImageButton>
</P>
<asp:Label id="Label2" runat="server"></asp:Label></P>
e nel codice sottostante
codice:
Private Sub ImageButton_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs) Handles ImageButton1.Command, ImageButton2.Command, ImageButton3.Command
Dim ImageButton As ImageButton = DirectCast(sender, ImageButton)
Me.Label2.Text = ImageButton.ID & ", " & e.CommandName
End Sub