Assigning Controls to an Array with arbitrary Index
Hi All
I have got the idea that the Control Arrays no longer exist in VB.Net. I can use an Array of Controls to simulate it though. My application in VB has a lot of textboxes on the Forms.
Further, these Forms are divided into some pre-defined section. Loosely based on the Sections, I gave an index to the Textbox...e.g. the numbering of textboxes in Section 1 would start as 1001, 1002...and so on. Similarly in Section 2, the textboxes would be numbered like 2001, 2002 etc.
I was using this Indexing for various purposes like applying validation to all similar kinds of Textboxes. Is there any way I can assign the controls to the array on similar indices and use it the way I was doing earlier.
Using the Name or the tag property to contain the Index would not be a good idea. I have around 700 to 800 controls and iterating through the entire collection of controls to arrive upon the required textbox might be expensive.
Thanx
Isha