I'm still trying to iterate through form control objects. In another thread GetReference was suggested. Can anyone give me the usage of this method. My error is this method can't be used in this context.

String strControl = "IX" + i;
Object Ctrl = GetReference(strControl);

You can use iteration as follows

foreach (Control t in this.Controls)
                {
                    if (t is TextBox)
                    {
                        //do something
                    }
                }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.