|
Wednesday, September 12, 2007 |
| Multiple controls with the same ID were found. FindControl requires that controls have unique IDs. |
|
This error gets thrown and looks something like Multiple controls with the same ID 'myControl1' were found. FindControl requires that controls have unique IDs.
This error typically occurs when trying to dynamically add or remove controls during the initial load of a page or a postback. You might hit a button and instead of a postback, you get this error. If you're getting this error and you're trying to add or remove controls from the page dynamically, you are most likely adding/removing after something has already been added to viewstate.
The key here is to do your add/remove before things like binding of other controls. Try adding or removing the control in the Page_Init. It might take a little creativity in your code to get the sequence correct. |
jeremy at 10:16 PM |
(17) Comments |
Add a comment |
Permalink
|
|
|
|