Resolved : Multiple controls with the same ID were found. FindControl requires that controls have unique IDs.
One of the reason to get the above error is logical implementation of dynamic control naming. Sometimes, we could not think of the future while writing the code. And might be that creates this error.
Following is the code where I get the error:
Label lblShoppingCartItem = new Label()
lblShoppingCartItem.ID = "lblShoppingCartItem” + CategoryID + ItemID;
Now, in above example following case will create problem
|CategoryID||ItemID||ID of control|
Whenever this two row will be in list to display, it throws this exception. So to resolve this we should try to put delimiter between two IDs.
So, it would be resolved once you put
lblShoppingCartItem.ID = "lblShoppingCartItem” + CategoryID + “_” + ItemID;