Hello everybody,
I've a little problem with a loop and I can't find a solution. If someone can help me I appreciate.
I'm trying to do a loop with a "while" or a "foreach" to put values in text boxes.
My problem is, if I put (textbox1.Text = "Some text"), my textbox1 take the text "Some text". It's what I need. I have multiple textboxes and I want to use a variable to replace the number of my textbox like "$textbox$number" but this one doesn't work.
Example:
$index = 1
while($index -lt 5)
{
$textbox$index.Text = "this is textbox $index"
$index = $index + 1
}
Can someone help's me please.
Sorry for my english
Loop
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times