Hi, there is probably a really simple answer to this but i cant find one anywhere!
i am trying to automatically generate multiple text boxes on a form with the following code
i need it to generate as many text boxes as the variable x states, so i used the do until loop thing. But i am stuck when it comes to naming the text boxes because obviously all the text boxes cannot share the same name. so i would like to know how to programmatically name each textbox uniquely.
Many Thanks, Wilson
i am trying to automatically generate multiple text boxes on a form with the following code
VB.NET:
Private Sub CreateTB(ByVal x As Integer)
Dim y As Integer = 1
Do Until y = x
Dim newtxtbox As TextBox
'Here will contain property settings for new text box when i work them out
y = y+1
Loop
End Sub
i need it to generate as many text boxes as the variable x states, so i used the do until loop thing. But i am stuck when it comes to naming the text boxes because obviously all the text boxes cannot share the same name. so i would like to know how to programmatically name each textbox uniquely.
Many Thanks, Wilson