Accessing UserControls from UserControls without having to rely on FindControl?

I don't understand your reluctance to use FindControl. Think about how Microsoft solved this exact same problem... Specifically, the validator controls. They just have a property called ControlToValidate that takes another control's ID as a string.

Internally, it probably just uses FindControl. (well, honestly I don't know, but it seems a likely bet).

As you say, FindControl only looks at a containers immediate children, so you would have to loop over them all to find a control. Why is this a problem? If you make the function recursive the whole thing ends up being only a handful of lines of code.

If you make it an extension to the Control class you then have handy access to the function.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions