Hi, I have a textbox named txtNumOfT where you can input the number of textboxes you want to insert (maximum is 9, minimum is 1) . When I click the insert textbox button, I want it to create the number of textboxes indicated on txtNumOfT textbox. After that, I'd like to change the name of each control to txtOp1 and so on. I'd also like to be able to save them into my database if I click on save to dab button.
Please help. I have absolutely no idea how to do this
UPDATE:
Okay, so I have already resolved the part where I need to insert textboxes based on the number I entered on the txtNumOfT textbox. The only thing I need to know now is how to save them into the database.
Code:Dim f As TextBox Dim i As Integer Dim a As Integer = Me.txtNumOfT.Text Dim l As Integer = 1 For i = 1 To a Me.TableLayoutPanel1.Controls.Add(New TextBox) Next For Each f In TableLayoutPanel1.Controls f.Name = "txtBlank" & l.ToString() f.Width = 147 f.Height = 24 l += 1 Next





Reply With Quote
