views:

23

answers:

2

I have 1 ModalPopupExtender inside a UserControl. Everything works great until I start adding the same usercontrol to the page. I am getting this error message in the javascript console::

Message: Sys.InvalidOperationException: Two components with the same id 'MPE1' can't be added to the application.

I understand the error, it obvious that the framework wants unique IDs. What I can't figure out is how to give them unique name. Thanks in advance for any help.

A: 

Hey,

Are you using .NET 4 with a ClientIDMode of static? That would cause the issue, though with the default or a predictive option, this should work... check the client footprint, to see if all of the ID's are MPE1 or how that's being done. It should be uc1_MPE1. If you have two UC's with the same ID (or null ID), that would cause the issue.

HTH.

Brian
A: 

Brian, thanks but this is in .NET 2.0.

The simple way to solve this is to just remove the tag "BehaviorID". That is the option I am going with now, I just hope in the future I won't have to use JS to call any of the popups.

ssparacio