I have found this code for using control array in VB.net, but this only works when I place text boxes on form, whereas in my case within tab control i have created group boxes and within group boxes there are a number of text boxes which i have used for control array. Please help me out regarding the problem.
Code is here:
For Each ctl In frm.Controls startOfIndex = ctl.Name.ToLower.IndexOf(controlName.ToLower & separator) If startOfIndex = 0 Then strSuffix = ctl.Name.Substring(controlName.Length) 'Check that the suffix is an integer (index of the array) If IsInteger(strSuffix) Then If Val(strSuffix) > maxIndex Then maxIndex = _ Val(strSuffix) 'Find the highest indexed Element End If End If Next ctl
I downloaded this code from following link: