You can't have multiple control definitions registered for the same DOM element - you'll get a script error:
Sys.InvalidOperationException: A control is already associated with the element.
You'll need to change one or both of your script classes to inherit Sys.UI.Behavior
instead of Sys.UI.Control
:
YourType.registerClass("YourType", Sys.UI.Control);
becomes:
YourType.registerClass("YourType", Sys.UI.Behavior);
You'll also need to replace the relevant ScriptControlDescriptor
with a ScriptBehaviorDescriptor
:
new ScriptControlDescriptor("YourType", ClientID);
becomes:
new ScriptBehaviorDescriptor("YourType", ClientID);
Have a look at the extender control walk-through on MSDN for information on creating script behaviors: http://msdn.microsoft.com/en-us/library/bb386403%28v=vs.100%29.aspx