4
Answers

Accessing Controls thrue the ID

Administrator

Administrator

21y
1.5k
1
Hi guys, i have a problem ... I started to create a webform with lots of Button and TextBoxes on it. Now i have an array with some int values (Color-Values) and i try to change the colors of the buttons and textboxes. I know how i can change the color-property for one button i named, but i would do it automatically. All Buttons have the ID "signal" + number I remember VB or VBA ... there i could use Me.Controls("signal"+i).BackColor = "Value" //for example I'm looking for an equal command in C# ---------------------------------------------------- for (int intI=0;intI
Answers (4)