c# - Access Dynamically Created Controls in a TabPageControl -
i creating bunch of usercontrols each in tab in tabcontrol. problem i'm having need access value controls. have no idea how this.
string q; foreach (tabpage tp in tabcontroler.tabpages) { filter f = tp.controls.find("filter",true); //not working @ all. q += f.querry; }
when creating control, add name it:
filter filter1 = new filter(); filter1.name = "filter1";
if winforms , filter1
name of filter control, be:
if (tp.controls.containskey("filter1")) { filter selectedfilter = (filter)tp.controls["filter1"]; } debug.write(selectedfilter.value);
Comments
Post a Comment