J
Jeff S
Using VB.NET/code behind, I'd like to programmatically access 15 imagebutton
controls by their ID (or some other identifying string). The ID of each of
the imageButton controls is Thumb0, Thumb1...Thumb14. I'd like to set
properties for each one from the code behind module, however, the
Page.Controls collection enables access only by index value. Is there a way
to access the control via its ID in a loop?... something like the following
p-code demonstrated (I know it doesn't work - but I'd like this
functionality):
Dim X as Integer
For X = 0 to 14
ImageControlName & CStr(X).ImageURL = strTemp
Next X
I don't want to loop through the entire controls collection and check TypeOf
Control to accomplish this.
Thanks in advance.
Jeff
controls by their ID (or some other identifying string). The ID of each of
the imageButton controls is Thumb0, Thumb1...Thumb14. I'd like to set
properties for each one from the code behind module, however, the
Page.Controls collection enables access only by index value. Is there a way
to access the control via its ID in a loop?... something like the following
p-code demonstrated (I know it doesn't work - but I'd like this
functionality):
Dim X as Integer
For X = 0 to 14
ImageControlName & CStr(X).ImageURL = strTemp
Next X
I don't want to loop through the entire controls collection and check TypeOf
Control to accomplish this.
Thanks in advance.
Jeff