4
Answers

Dynamic creation of control names .. is it possible?

KlytusLord

KlytusLord

19y
1.8k
1
Greetings everyone, Is it possible to use variables in order to construct the name of a control? I am not trying to create the controls dynamically, what I am looking for is a way of referring to a control's name by using a variable. Example: Say these controls exist already: control1, control2, and control3 What I would like to do is somehow be able to make a statement such as: var = 1; "control"+ var.Text = "whatever"; I know the syntax above is incorrect, but it is to illustarte my question. Thanks for the input.
Answers (4)