Hi
Is it possible to target a variable, whose name you create from the content of other variables? Please stay with me on this one as I'm getting little feedback from the ASP.NET world. I'm assuming I'm not explaining it well enough.
Example:
I have some variables, for arguments sake lets call them strVar1, strVar2 and strVar3. I also have an integer variable named intVarNumber.
I want to set the value of my strVar variables above but my script doesn't know the name of the variable to target.
What the script does have is a number between 1 and 3 wrapped up in the variable intVarNumber.
So, I would like to find a way to get the script to target the variable named: "strVar" & intVarNumber. Thus targeting either strVar1, strVar2 or strVar3 depending on the contents of intVarNumber.
Please please can someone ask me what the hell I'm talking about if they don't understand and I'll try to give more examples. So far on other forums I'm just getting a complete lack of response. I'm sure this must be a common problem. I just don't know the correct words/buzz words to describe it!!
Many many thanks for any help on this now major headache!
Shaun
Is it possible to target a variable, whose name you create from the content of other variables? Please stay with me on this one as I'm getting little feedback from the ASP.NET world. I'm assuming I'm not explaining it well enough.
Example:
I have some variables, for arguments sake lets call them strVar1, strVar2 and strVar3. I also have an integer variable named intVarNumber.
I want to set the value of my strVar variables above but my script doesn't know the name of the variable to target.
What the script does have is a number between 1 and 3 wrapped up in the variable intVarNumber.
So, I would like to find a way to get the script to target the variable named: "strVar" & intVarNumber. Thus targeting either strVar1, strVar2 or strVar3 depending on the contents of intVarNumber.
Please please can someone ask me what the hell I'm talking about if they don't understand and I'll try to give more examples. So far on other forums I'm just getting a complete lack of response. I'm sure this must be a common problem. I just don't know the correct words/buzz words to describe it!!
Many many thanks for any help on this now major headache!
Shaun