Dynamically create textbox

Posted by comii on Stack Overflow See other posts from Stack Overflow or by comii
Published on 2010-03-20T16:28:34Z Indexed on 2010/03/20 16:31 UTC
Read the original article Hit count: 262

Filed under:
|
|

I need to dynamically create textbox. This is my code, but with this I create only one textbox:

 Public Sub CreateTextBox()
        Dim I As Integer
        Dim niz As Array
        For I = 1 To 5
           Dim myTextBox = New TextBox
           myTextBox.Text = "Control Number:" & I
            Me.Controls.Add(myTextBox)
        Next

    End Sub

So how i can dynamically create textbox?

Thanks!

© Stack Overflow or respective owner

Related posts about .NET

Related posts about vb.net