I have a parent form, which contains panels that calls different user control.
For example, the file is something like this.
Form1.cs -> Contains the main panel
selectioninterface.cs -> Contains a combobox which dynamically changes the panel(interface1 or interface2)
interface1.cs
interface2.cs -> These contains a separate panel which form1.cs calls inside its panel.
I am currently looping through the form1 panel using this.
foreach(Control control in panel.Controls) {
if(control.GetType() == typeof(selectioninterface))
{
}
}
I got this part, but I need to access the textbox and combobox information located inside the interface1 and interface2 panels. How do I access them?
you can use
this will return a control collection if specified control exists