After updating to the 1/23 release of AJAX/CTP/AjaxToolKit I started receiving different versions of the following javascript error message:
> Two components with the same id ‘{0}’ can’t be added to the application
an example of the actual error message:
> Error: Sys.InvalidOperationException: Two components with the same id 'ctl00_cphMain_acNounPopupBehavior' can't be added to the application.
I would get this error message for every instance of an AutoCompleteExtender that existed in the UpdatePanel I was working in. The error would happen when called an OnClick event for a button that was also in that UpdatePanel. After the error messages occurred, the AutoCompleteExtenders would stop functioning. If I tried to use one of the AutoCompleteExtenders I would get the following javascript error:
> Error: 'this._popupBehavior' is null or not an object.
I searched up and down these forums for a solution and did see a few other users having similar problems with extenders + update panels and receiving the "two components" error message but I found no working solutions. I tried to recreate the error with a from scratch AJAXWebApplication and was unable to. I copied the working code form my from scratch app to my application with the error and it started experiencing the same error. I looked through the web.config file about 10 times before running it through WinMerge to compare and found the following difference:
> <compilation debug="false"> (on the working version)
> <compilation debug="true"> (on the non-working version)
I changed debug to false for my primary application and it fixed the "two component" error message. I don't know if this will fix the other errors that were similar to mine but I wanted to post this in hopes it might. Also, looking back over the migration docks I did find this:
> Move settings that determine whether to render the debug or the retail version of JavaScript code out of the page and into the Web.config file, as shown here:
> <configuration>
> <system.web>
> <compilation debug="false" />
> </system.web>
> </configuration>
I was previously running in true debug mode without issues so I never considered this to be an important command. Obviously something changed in the latest release that is affected by debug = true.
Hope this helps