I have some UserControl
s named a1, a2, b1, b2... and I want to load one of them depending of the value of two variables. For example, if var1 = a
, var2 = 1
, the UserControl
named a1
will be loaded.
Is there a way of doing this? Perhaps some other alternate approach?
A switch
statement is not a viable option here, because there will be like 200 different UserControls.