单击保存按钮时如何保存动态创建的文本框的数据

问题描述:

你好,

我正在开发桌面应用程序.我已经创建了许多动态文本框和标签,并且想要通过单击保存"按钮来保存该数据.

如果有任何疑问,如果您不清楚我的意思,请提出.这很紧急.请帮忙!!!
请给我建议,并帮助我进行这些工作.
希望得到任何帮助,我们将感到非常高兴和感谢.

在此先谢谢您..

Hello,

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..

我认为您必须像下面那样创建Dynamic TextBoxes

在顶部声明
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"
        Controls.Add(txt)


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
        MessageBox.Show(a)
    End Sub



接下来实现它以保存...



Next implement it to save ...