0
Answer

Access a typed object using ID string

Ben

Ben

14y
2k
1





Hi, how can one access a typed object's properties using a programmatically created ID string?

'There are 10 image buttons on the page with ID imagebutton1, imagebutton2,...

Dim imgBtn as Imagebutton 
Dim imgIDString as String

For i as Integer = 1 to 10
    imgIDString = "ImageButton" & i.ToString 

    'Do what here to make imgBtn an instance of object with ID imgIDString?

    imgBtn.property = array(i-1)
Next
 
Or is there a better way to do this task?