Retreive control with certain type (Related to Win form and ASP.net)
-
Hi everyone, I have some usercontrols which implements my custom interface IMyControl. I want to know if there is a EASY and EFFICIENT way to retreive all my custom controls with type = IMyControl from either ASP.net page or winforms. I know I can recursively loop through each control.controls and compare the typeof ctrl is IMyControl but I think this is not efficients if I have nested level of controls? thanks in advance.. cheers. Wilson
Still a newbie.. learning
-
Hi everyone, I have some usercontrols which implements my custom interface IMyControl. I want to know if there is a EASY and EFFICIENT way to retreive all my custom controls with type = IMyControl from either ASP.net page or winforms. I know I can recursively loop through each control.controls and compare the typeof ctrl is IMyControl but I think this is not efficients if I have nested level of controls? thanks in advance.. cheers. Wilson
Still a newbie.. learning
Y can't you use 'findcontrol()' method. Will it solve your problem ?
Thanks & Regards, Jeneesh k. v.
-
Y can't you use 'findcontrol()' method. Will it solve your problem ?
Thanks & Regards, Jeneesh k. v.
thanks.. but don't think that is what I want to achieve.. what I want to do is retreive all those controls with specify type e.g. IMyControls. then I can call a function declared within that interface for all those controls. . I don't think I can just the FindControl to get certain TYPE of control? Cheers, Wilson
Still a newbie.. learning