R
Robert Smith
Hi,
I have several dropdownList controls on my form and I wish to loop
through them all and find the selected value and then concatenate them
together into a string. The problem is I can't find a way to group the
controls together so that I can loop through them, If I put them in a panel I
get a compilation error.
If wish to go
foreach (Control MyControl in ??????)
{
if (typeof(mycontrol) is dropdownlist)
{
mystring = mystring + mycontrol.selectedvalue
}
}
The problem is with the grouping together of the controls not the string
concatenation. How can I group the controls so that I can loop through them?
Thanx in advance
Robert
I have several dropdownList controls on my form and I wish to loop
through them all and find the selected value and then concatenate them
together into a string. The problem is I can't find a way to group the
controls together so that I can loop through them, If I put them in a panel I
get a compilation error.
If wish to go
foreach (Control MyControl in ??????)
{
if (typeof(mycontrol) is dropdownlist)
{
mystring = mystring + mycontrol.selectedvalue
}
}
The problem is with the grouping together of the controls not the string
concatenation. How can I group the controls so that I can loop through them?
Thanx in advance
Robert