Author: SteveInTN | Posted on: 8/27/2009 1:51:01 PM | Views : 270

I have a user control (UC1) with two dropdowns and a textbox.  I am dynamically adding instances of UC1 to a container within another user control (UC2), which is nothing but the container and the code used to add new instances of UC1.
I have selectedindexchange events for the dropdowns on UC1.  I also have some public properties that I set in order to help populate the controls within UC1.  One of the public properties is a GUID, so that I can keep track of the different instances.

When I add the first instance of UC1 to UC2 everything is great.  The events fire as they should and all works as expected.  When I add a second instance of UC1 everything starts off fine.  The problem comes when the selectedindexchange event for a dropdown fires.  In the event for the instance of UC1, it picks up the selectedindex of the same dropdown in the 1st instance.  After this initial confusion, everything is fine on subsequent postbacks t ...

Go to the complete details ...