I'm having a problem in vb.net:
1. Adding a button and a textbox with a variable name and tag [I've got that].
2. By clicking on the button --> the tag value of the button (just created with variable tag) will be displayed in the textbox (which also has just been created)(everything with variable name and tags)[Problem].
How can I get the tag value of the button (which is clicked) displayed in the textbox?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim DeleteBT As New Button Dim NumberTB As New TextBox With DeleteBT .Name = "Number" & My.Settings.Number .Tag = My.Settings.Number End With With DeleteBT .Name = "NumberDelete" & My.Settings.Number AddHandler .Click, AddressOf Number End With Me.Controls.Add(DeleteBT) Me.Controls.Add(NumberTB) End Sub
Private Sub Number() End Sub
If something is not clear, please ask (I'm not native English).
Thanks in advance!