AssociatedControlId of inner namingcontainer

Posted by Eric on Stack Overflow See other posts from Stack Overflow or by Eric
Published on 2010-04-19T04:02:21Z Indexed on 2010/04/19 4:03 UTC
Read the original article Hit count: 315

Hi,

I have a custom control contains a label control. I want to set the AssociatedControlId of this label to be other control id on the page, but as soon as I implement the INamingContainer in my custom control, it will run into an error saying "Unable to find control with id 'abc' that is associated with the Label 'xyz'." This would be due to the fact that the label is in a nested naming container and it trys to find the control within the same container but couldn't (as the control is on the page, outside of it own naming container)

Anyone know of a way to set this property?

Thanks,

Eric

© Stack Overflow or respective owner

Related posts about associations

Related posts about findcontrol