Mondeo
Well-known member
I have several literal controls on my page, Literal1, Literal2, Literal3 etc
I have a function which takes an index
Private Sub UpdateLiteral(byval index as int16)
...
End Sub
In that sub I want to update the corresponding literal to the index that comes in, I could do:
Select Case index
Case 1
Literal1.Text = "new value"
Case 2
Literal2.Text = "new value"
Case 3
Literal3.Text = "new value"
End Select
But theres a lot more than 3 literals, how can I dynamically generate the object name that I want to manipulate?
Thanks
I have a function which takes an index
Private Sub UpdateLiteral(byval index as int16)
...
End Sub
In that sub I want to update the corresponding literal to the index that comes in, I could do:
Select Case index
Case 1
Literal1.Text = "new value"
Case 2
Literal2.Text = "new value"
Case 3
Literal3.Text = "new value"
End Select
But theres a lot more than 3 literals, how can I dynamically generate the object name that I want to manipulate?
Thanks