Hi All,
An app I'm working on creates a table web control with a dynamic number of rows containing labels text boxes and list boxes. I assign names like text1,list1 for row 1 text2, list2 for row 2 etc.
I would like to retrieve them in a loop like the schematic example below :
for i = 1 to MyTable.Rows.Count
set TextControl = controls("Text" & i)
set ListControl = controls("List" & i)
SomeTextValue = TextControl.Text
SomeListItem = ListControl.SelectedItem
'Write the data to a database and move on
next
However, I can't figure out how to cast the controls to an object by their name.
Does anybody have a solution?
Thanks!!!!
An app I'm working on creates a table web control with a dynamic number of rows containing labels text boxes and list boxes. I assign names like text1,list1 for row 1 text2, list2 for row 2 etc.
I would like to retrieve them in a loop like the schematic example below :
for i = 1 to MyTable.Rows.Count
set TextControl = controls("Text" & i)
set ListControl = controls("List" & i)
SomeTextValue = TextControl.Text
SomeListItem = ListControl.SelectedItem
'Write the data to a database and move on
next
However, I can't figure out how to cast the controls to an object by their name.
Does anybody have a solution?
Thanks!!!!