Hi all. I'm probably missing something obvious. I have a UserControl inside a PlaceHolder which is inside a Panel. That panel is a child control of the parent UserControl that contains the property I need to access. Using the code below, I get a casting error, obviously because my upload control's direct parent is the placeholder control. What is the best way for me to access the property I need
Should I just abandon trying to seek out the property in the parent above and just pass the values I need in custom event args? My parent control has an "upload files" button that exposes the visibility of the upload control's panel. I could probably pass what I need through event args, but I would still need to get a reference to that parent control though just so I could listen for the event. I'm just looking for the simplest solution.
Just to recap: My control heirarchy is: Parent UserControl -> Panel -> PlaceHolder -> Upload UserControl and I need to get a reference to a property in the Parent contriol from the Upload Control. Thanks for any help.
FileManager40 ucFileManager40 = (FileManager40)this.Parent;
Category _currentFolder = ucFileManager40._CurrentFolder;