As ayan points out its not that '"sender" merely indicates what kind of control initiated the event' sender IS the control that raised the event.
It is wise to cast the sender to its proper type if you know what it is. Then you can access its members correctly.
VB Code:
Private Sub RadioButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.Click 'cast it Dim rb As RadioButton=Ctype(sender,RadioButton) 'use it Msgbox(rb.Text) End Sub




Reply With Quote