Hi
Im creating customer details form in VB.Net, in that Im getting
Original Details as well as Correspondance details of customer. If both
are same then by clicking checkbox all the text of respective fields
should be filled in correspondance details textboxes. I achieved some
what like this....
Try
Dim i, i1 As Control
Dim j As New TextBox
If CheckBox1.CheckState = CheckState.Checked Then
For Each i In TabControl1.TabPages(0).Controls
If TypeOf i Is TextBox Then
j = New TextBox
If Microsoft.VisualBasic.Mid(i.Name(), Len(i.Name()),
Len(i.Name())) = "1" Then
j.Name = (Microsoft.VisualBasic.Left(i.Name,
Len(i.Name) - 1)).ToString
'i1.Name = j
'i1.Text = "Testing"
i.Text = j.Text
'MsgBox(j.Text)
End If
End If
Next
End If
Catch ex As Exception
MsgBox(ex.Message)
But my problem is even I declared "j" as control, Im not getting j.text
as result, alternatively Im getting textboxes name but not textbox.text
values.. please anyone can help....