A
anthony
I know this is probably talk about millions of time here, but I cant seem
to find a close one, I am so used to the vb6 control array, now that I have
to use vb.net for my project, I like to do the following in vb.net with this
vb6 way:
In vb6, I would create five labels array on a form:
lblDisplay(1)...lblDisplay(5), and in each label I would have tag property:
Display1...Display5.
Then, in code (omitted some connection string below):
rst = new ADODB.Recordset
for i = 1 to lblDisplay.Count
rst.open("select Value from Tags where Name='" & lblDisplay(i).Tag &
"'")
lblDisplay(i).Caption = rst!Value
next i
How would I do this in VB.NET? I read some books, they mentioned about
using the Tag property to identify the control, but I want to get your
opinion on this.
Thanks!!!
to find a close one, I am so used to the vb6 control array, now that I have
to use vb.net for my project, I like to do the following in vb.net with this
vb6 way:
In vb6, I would create five labels array on a form:
lblDisplay(1)...lblDisplay(5), and in each label I would have tag property:
Display1...Display5.
Then, in code (omitted some connection string below):
rst = new ADODB.Recordset
for i = 1 to lblDisplay.Count
rst.open("select Value from Tags where Name='" & lblDisplay(i).Tag &
"'")
lblDisplay(i).Caption = rst!Value
next i
How would I do this in VB.NET? I read some books, they mentioned about
using the Tag property to identify the control, but I want to get your
opinion on this.
Thanks!!!