i write the following code to create code
Dim i, x, y As Integer
x = 30
y = 25
i = 0
For i = 0 To dt1.Rows.Count - 1
Dim chk As New CheckBox()
chk.Text = dt1.Rows(i)(0)
chk.Location = New Point(x, y)
chk.Font = fnt
chk.Width = 450
chk.ForeColor = Color.White
Me.Panel1.Controls.Add(chk)
chk.Name = "chk" & Convert.ToString(i)
Dim txt As New TextBox
txt.Location = New Point(x, y + 23)
txt.Font = fnt
txt.Multiline = True
txt.Height = 46
txt.Width = 400
Me.Panel1.Controls.Add(txt)
txt.Name = "txt" & Convert.ToString(i)
y = y + 69
i want to retrive the textvalue of checkbox whose checked property is true and respective textbox at a buttonclick event. Problem is in finding the controls and their textvalue. any one can help?Thanks in Advance.dt1 is datatable .For window form application