This is a migrated thread and some comments may be shown as answers.

JS Error - Type Telerik.Web.UI.Orientation has already been registered

1 Answer 378 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
FaSSt2001
Top achievements
Rank 1
FaSSt2001 asked on 17 Sep 2009, 05:36 PM
Hi.

We are evaluating the latest version of the RadControls for ASP.NET and have come across a problem. I have two separate projects that both contain custom server controls. One project is the main website with it's own server controls and the other project is another set of server controls that would need to be reusable in other projects. Project 1 has a server control with a RadMenu in it placed on the aspx page. Project 2 has a server control with a RadTreeView in it. When I include the server control from project 2 with the RadTreeView on the same page as the RadMenu, I get the following JavaScript errors:

Error: Sys.InvalidOperationException: Type Telerik.Web.UI.Orientation has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.

Error: Sys.InvalidOperationException: Type Telerik.Web.UI.AttributeCollection has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded. A possible cause is a change of settings during a partial update.

Both projects import Telerik.Web.UI.

The conclusion I'm coming to is that the scripts are getting registered twice when I bring in the control from Project 2 because it is also referencing the Telerik dll.

I am currently using a ToolKitScriptManager as I tried to implement a RadScriptManager, but it throws an "Object not set" error.

Have you heard of this problem? Is there any way to make it work with using an external server control that also references the Telerik dll? Is there a way to check if Telerik.Web.UI is already imported so it doesn't import it a second time?

Just a note that it works fine if the RadTreeView server control is a part of project 1 also and placed on the page, but the second I add the external control from project 2, it throws those JavaScript errors.

Thanks for any assistance.
Ed

1 Answer, 1 is accepted

Sort by
0
FaSSt2001
Top achievements
Rank 1
answered on 17 Sep 2009, 11:22 PM
Nevermind, I figured out the problem. I had two different versions of the dll. I downloaded the latest release also and I had them mismatched. Thanks anyway.

Ed
Tags
General Discussions
Asked by
FaSSt2001
Top achievements
Rank 1
Answers by
FaSSt2001
Top achievements
Rank 1
Share this question
or