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

lerik.Web.UI.Orientation has already been registered.

4 Answers 125 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 09 Dec 2009, 09:04 PM
Hello,

I'm getting the following error in one of my pages:

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.

The page was working OK, but now all of a sudden, I'm getting this error.  I have this in a partial view:

<%= Html.RadControlCss<RadCalendar>() %>

<%= Html.RadControlScripts<RadCalendar>() %>

<%= Html.RadControlCss<RadDateInput>() %>

<%= Html.RadControlScripts<RadDateInput>() %>

<%= Html.RadControlCss<RadTimeView>() %>

<%= Html.RadControlScripts<RadTimeView>() %>

<%= Html.RadControlCss<RadTextBox>() %>

<%= Html.RadControlScripts<RadTextBox>() %>

<%= Html.RadControlCss<RadDatePicker>() %>

<%= Html.RadControlScripts<RadDatePicker>() %>

<%= Html.RadControlCss<RadTimePicker>() %>

<%= Html.RadControlScripts<RadTimePicker>() %>

<%= Html.RadControlScripts<RadDateTimePicker>() %>

<%= Html.RadControlCss<RadComboBox>() %>

<%= Html.RadControlScripts<RadComboBox>() %>


<%= Html.RenderRadDatePicker((rad) =>

{

rad.ID = "StartDate";

rad.SelectedDate = DateTime.Today;

 

}, "Forest") %>

<%= Html.RenderRadTimePicker((rad) =>

{

rad.ID = "StartTime";

rad.SelectedDate = DateTime.Now;

 

}, "Forest") %>

Is this the cause of anything?

Thanks.

4 Answers, 1 is accepted

Sort by
0
Brian Mains
Top achievements
Rank 1
answered on 09 Dec 2009, 09:43 PM
It is legitimately being duplicated along with other scripts, and that is causing an issue...
0
Georgi Krustev
Telerik team
answered on 11 Dec 2009, 12:03 PM
Hi Brian,

I have answered to the support ticket open on the same matter. Here is a quote of the answer:

Hi Brian,

After I've reviewed your code snippet I noticed that you are registering scripts of the control first and then call
RenderRadDatePicker, which also registers the control's scripts. If you need to register scripts only once, remove script registration in the RenderRadDatePicker method. The other option is to rely on RenderRadDatePicker to register the scripts and avoid calling RadControlScripts on the page.

Please give a try and let me know how it goes. If the problem still persists I will ask you to send us a working test project, which reproduces the depicted issue.

Best wishes,


All the best,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
rajendra
Top achievements
Rank 1
answered on 17 Jun 2010, 03:21 PM
for me Setting RegisterWithScriptManager to true solved the problem..... hope this will atleast help someone
0
Robert
Top achievements
Rank 1
answered on 14 Jul 2010, 05:01 PM
removed.
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Brian Mains
Top achievements
Rank 1
Georgi Krustev
Telerik team
rajendra
Top achievements
Rank 1
Robert
Top achievements
Rank 1
Share this question
or