Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

Accessing Controls thrue the ID

Mar 13 2003 10:06 AM
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)