FindControl Failed For The Error Provider Control

I have a User Control containing a Error Provider, and I need to find and parse it out of my Action Pane control. So, I get a reference to the parent control and then loop all children recursively (pretty common approach, right?) Once I find the Error Provider, I can cast and further work on it ideally.

However, I can't find this control from the control tree (surprise me) because I'm able to see the parent control (ContainerControl) of the Error Provider is the User Control itself...



What I finally did is to create a Get property on the User Control and expose the Error Provider.

Colt Kwong

1 Comment

Comments have been disabled for this content.