Click here to Skip to main content
15,882,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

I am working on desktop application. I had created number of dynamic textbox and label and I want to save that data on clicking the save button.

If any question, if you did not get my point clear than please ask. Its urgent. Please Help!!!
Please give me suggestion and help me to work on these.
It would be pleased and appreciated to any help

Thanks in advance..
Priya Sarin 14-Jun-12 8:54am    
Thank you so much Mr vivek karwa.
Its working.. :)
Karwa_Vivek 14-Jun-12 9:08am    

1 solution

I think you must have done like below for creating Dynamic TextBoxes

declared at the top
Dim WithEvents txt As TextBox

 Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        txt = New TextBox
        txt.Name = "tb1"

End Sub

You can get the Text Of the textbox
Private Sub btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn.Click
        Dim a As String = Me.Controls("tb1").Text
    End Sub

Next implement it to save ...
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900