0

I'm having problems with getting the ID from a label when using a AddHandler, this is an example but i am also using this for control arrays which labels.

AddHandler CmdUpdate.Click, AddressOf CmdUpdate_click

Protected Sub CmdUpdate_click(sender As Object, e As EventArgs) 
 '?
End Sub
Will Peckham
  • 574
  • 1
  • 7
  • 18

1 Answers1

1

Use sender.Name property.

You should cast sender to a Control:

DirectCast(sender, Control).Name
Teejay
  • 7,210
  • 10
  • 45
  • 76