I get inconsistent behavior when using repeater. I have a repeater with textboxes inside populated from a DataTable. Everything works perfectly for a while then the following error starts to popup.
Multiple controls with the same ID 'txt' were found. FindControl requires that controls have unique IDs.
The error seems to occur on the second session:
Rebuild & Debug: Everything works perfectly.
Stop debugging & Debug again: Error occurs indefinitely until rebuild.
Any ideas what can cause this ? Thanks in advance.
Error shows that you are using same id for textboxes. You must have to use dynamic ids for textboxes like "txt_data_{uniqueId}" . Here uniqueId may be index or can use your primary key of data.
Here you can see answer for image tag : https://forums.asp.net/t/1655369.aspx?Multiple+controls+with+the+same+ID
This will help to you : Set ID of Items In a Repeater