Looping Controls

  • Thread starter Thread starter Big E
  • Start date Start date
B

Big E

I'm using VB.Net and SQL Server. I have a text box and a Image on a form. I
want to create some type of loop that will create textboxes and images
dynamically. If there are 15 records in the database I want it to create 15
textboxes and images.
I know how to do it in ASP but not in VB.Net windows forms.

Thanks.

Erik
 
* "Big E said:
I'm using VB.Net and SQL Server. I have a text box and a Image on a form. I
want to create some type of loop that will create textboxes and images
dynamically. If there are 15 records in the database I want it to create 15
textboxes and images.
I know how to do it in ASP but not in VB.Net windows forms.

\\\
For ...
Dim b As New Button()
With b
.Left = ...
.Right = ...
.Text = ...
End With
Me.Controls.Add(b)
Next ...
///
 
Back
Top