laconicdev
laconicdev

Reputation: 6440

"A control is already associated with the element" exception

We are migrating a web applicatin from vs05 to vs08. This application is using Telerik web controls. After I converted the project, and run, I get the exception: "A control is already associated with the element". I traced it down to a use control that has Telerik RadCombo box on it. However, I don't see anything out of place. Researching it, hasn't gotten me any results. I would appreciate any pointers.

Thanks!

Upvotes: 1

Views: 4640

Answers (2)

Greg Woods
Greg Woods

Reputation: 11

Not sure if this helps, but we started getting this exception when we moved from 2.0 to 4.0. We were already disposing of the control but the fix was to also set it to undefined.

child.control.dispose();
child.control = undefined;

Upvotes: 1

lingvomir
lingvomir

Reputation: 2584

Search for the ID of the problematic combo box in your solution and see where it is used. If you have not set an ID attribute for the control - do so and make sure it is unique.

If you are using AJAX requests make sure that you are updating all controls that need to be updated after AJAX.

Upvotes: 2

Related Questions