I am relatively new to this, but here is my problem.
In asp.net, I have a parent and a child control. Within the child control I have a dropdown list. Based on dropdown list’s selected value I would like to toggle Visibility of Panel in parent control. For instance if I select Show in child control dropdown list, I need to pass true to parent control to make Panel visible and vice versa. How should I do that. I have read that can be done via the event handling and have seen certain scenarios but I am not clear on that. Please help!
Thanks.
Raise an event that your parent control listens for.
In the code behind for your parent control, create an object of the type of your child control. Something like:
Then in the child control, define an event
In the OnIndexChanged event of your DropDownList, after you do your processing, raise your event:
In your parent control, wire up the event. Page_Init is good
Still in the parent control, define your method
Should be all you need to get it working!