[RESOLVED] How to receive value in dynamic textbox on click
I have searched for an answer to this and can't find one. I have a panel with dynamically-created textboxes running down it. When the user clicks on one of the textboxes, I want to get the value in the textbox. I add an on-click event handler in my loop and when one of the textboxes on the panel is clicked the event fires and the sub is entered. I just don't know how to get the value in the textbox which was clicked once entering the subroutine.
Code:
Sub MyMessage(ByVal Sender As System.Object, ByVal e As System.EventArgs)
' What goes in here?
End Sub
Re: How to receive value in dynamic textbox on click
Code:
dim value as string = directcast(sender, textbox).text
Re: How to receive value in dynamic textbox on click
Works like a charm! Thanks.