Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am creating a windows form in vb.net
i have this following code:
For i As Integer = 0 To 4
Dim label As New Label()
label.Location = New Point(13, 13 + (i * 30))
label.Text = Name
Me.Controls.Add(label)
'Textbox
Dim textbox As New TextBox()
textbox.Location = New Point(60, 13 + (i * 30))
textbox.Text = "URL"
Me.Controls.Add(textbox)
Next

but in this the data is not displaying..i want that the data should be displayed in the textboxes which user opens through openfiledialog..so plz help me how should i display the data in the textbox which i have created by using for loop
Posted

1 solution

By your code, you can get 5 textboxes, but you will able able to get id of it.
So set id for each control and then assign text to it.
 
Share this answer
 
Comments
shashank 1068 7-May-13 1:23am    
sry i am not getting your point :(

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