T
tantiboh
I've got a situation where I'm trying to refer to a control in terms of a counter.
I've got a 4x4 grid of labels, uniformly named according to their position in the grid, i.e. lbl00, lbl01, lbl02, lbl03, lbl10, lbl11, etc.
I'd like to refer to these controls with counters so that I don't have to have 16 case statements, in a theoretical fashion such as this:
for (int n = 0; n <= 3; n++) {
for (int o = 0; o <= 3; o++) {
ControlName = "lbl" + cstr(n) + cstr(o);
AssignValue(ControlName);
}
}
In other words, I want to refer to a control by constructing a string. That's where I hit a wall. Is there a way to convert that string into some sort of reference to a control?
Thanks for your help!
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
I've got a 4x4 grid of labels, uniformly named according to their position in the grid, i.e. lbl00, lbl01, lbl02, lbl03, lbl10, lbl11, etc.
I'd like to refer to these controls with counters so that I don't have to have 16 case statements, in a theoretical fashion such as this:
for (int n = 0; n <= 3; n++) {
for (int o = 0; o <= 3; o++) {
ControlName = "lbl" + cstr(n) + cstr(o);
AssignValue(ControlName);
}
}
In other words, I want to refer to a control by constructing a string. That's where I hit a wall. Is there a way to convert that string into some sort of reference to a control?
Thanks for your help!
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...