We are using Telerik asp.net control rad:RadSplitter in the Master page. This needs asp:ScriptManager to run. And all the javascript files are referenced inside the scriptManager in the Master page such as follows:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
<Scripts>
<asp:ScriptReference Path="~/Scripts/jquery-1.3.2.min.js" />
<asp:ScriptReference Path="~/Scripts/TestGeneral16.js" />
<asp:ScriptReference Path="~/Scripts/jQueryCustom5.js" />
<asp:ScriptReference Path="~/Scripts/jquery.easing.1.3.js" />
<asp:ScriptReference Path="~/Scripts/HoverNested20.js" />
<asp:ScriptReference Path="~/Scripts/Intake.js" />
<asp:ScriptReference Path="~/Scripts/FrontDesk.js" />
<asp:ScriptReference Path="~/Scripts/corner.js" />
</Scripts>
</asp:ScriptManager>
We tried to replace this with ScriptRegistrar() such as follows :
<%
Html.Telerik().ScriptRegistrar().Scripts(scripts =>
scripts.
.Add("~/Scripts/TestGeneral16.js")
.Add("~/Scripts/jQueryCustom5.js")
.Add("~/Scripts/jquery.easing.1.3.js")
.Add("~/Scripts/HoverNested20.js")
.Add("~/Scripts/Intake.js")
.Add("~/Scripts/FrontDesk.js")
.Add("~/Scripts/corner.js")
.Combined(true)
.Compress(false)
.CacheDurationInDays(30)
))
.Render();
%>
This did not work. It could not recognise some the javascript functions inside some of the javascript files.
Secondly, we are using Telerik MVC tabstip inside the content page :
<% Html.Telerik().TabStrip()
.Name("TabStrip")
.Items(tabstrip =>
{
tabstrip.Add()
.Text("ASP.NET MVC")
.Content(() =>
{%>
<p>Content</p>
<%});
tabstrip.Add()
.Text("Silverlight")
.Content(() =>
{%>
<p>Content2</p>
<%});
})
.SelectedIndex(0)
.Render();
%>
<%
Html.Telerik().StyleSheetRegistrar()
.DefaultGroup(group => group.Add("telerik.common.css")
.Add("telerik.vista.css"))
.Render();
%>
<%
=Html.Telerik().ScriptRegistrar()
%>
This throws an exception because the scriptregistrar is loading the jquery-1.3.2.min.js again, which is already there is the master page.
We have included in the web.config the following:
1. <add verb="GET,HEAD" path="asset.axd" validate="false" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc"/>
2.
<add name="AssetHandler" preCondition="integratedMode" verb="GET,HEAD" path="asset.axd" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc"/>
If there is some other way to declare the ScriptRegistrar inside the content page, so that it does not include the jquery-1.3.2.min.js, which is already emitted in our master page, our problem will probably be solved.
Overall, we are using two methods to register .js files;
• Asp:ScriptManager
• Html.Telerik().ScriptRegistrar()
It seems they are conflicting with each other.
Second Question:
Is it possible to make rad:RadSplitter working using SriptRegistrar instead of using asp:ScriptManager?