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

Alternative to RadScriptManager for scripts Combining

6 Answers 133 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 11 Aug 2014, 06:02 PM
Is there any alternative for RadScriptManager for combining scripts? . I'm using latest AjaxControlToolKit and Telerik controls which are causing issues in my code if i'm using RadScriptManager. So I have replaced RadScriptManager with AjaxControlTookKitScriptManager , now I need a solution for combining script files of telerik on page load as I cannot combine scripts using AjaxControlToolKit for Telerik . Please help on this

6 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 14 Aug 2014, 08:19 AM
Hi Ravi,

At the moment this is not possible. Please look here:
http://www.telerik.com/forums/telerik-ui-for-asp-net-ajax-and-ajax-control-toolkit

Regards,
Hristo Valyavicharski
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ravi
Top achievements
Rank 1
answered on 14 Aug 2014, 01:35 PM
Is there any work around  by using script files ? by  Bundling(combining) scripts manually? . Please help me on this
0
Ravi
Top achievements
Rank 1
answered on 14 Aug 2014, 02:15 PM
I tried  approach in the following link by taking scripts .
http://www.telerik.com/help/aspnet-ajax/introduction-disabling-embedded-resources.html
Is there any work around  by using script files ? by  Bundling(combining) scripts manually? . Please help me on this
0
Hristo Valyavicharski
Telerik team
answered on 19 Aug 2014, 11:45 AM
Ravi,

This post is duplicated to this one:
http://www.telerik.com/community/forums/radscript-manager-and-ajaxcontroltoolkitscriptmanager-compatability-problems

The simplest way to run RadControls and AjaxControlToolkit together is the following:

Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
        <ajaxToolkit:ToolkitScriptManager runat="server" ID="ScriptManager1" CombineScripts="false" EnableCdn="false">
        </ajaxToolkit:ToolkitScriptManager>
        <script type="text/javascript">
            //Put your JavaScript code here.
        </script>
        <div>
            <telerik:RadComboBox runat="server" ID="RadComboBox1"></telerik:RadComboBox>
            <ajaxToolkit:AsyncFileUpload runat="server" ID="Upload" />
        </div>
    </form>
</body>
</html>

web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled" />
    <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled" />
  </appSettings>
  <system.web>
    <compilation debug="false" targetFramework="4.5.1">
      <assemblies>
        <add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
    </compilation>
    <httpRuntime targetFramework="4.5.1" />
    <pages>
      <controls>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
      <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /></controls>
    </pages>
    <httpHandlers>
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
    </httpHandlers>
    <httpModules>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
    </httpModules>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="RadUploadModule" />
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode" />
      <remove name="RadCompression" />
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" />
    </modules>
    <handlers>
      <remove name="ChartImage_axd" />
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
      <remove name="Telerik_Web_UI_DialogHandler_aspx" />
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
      <remove name="Telerik_RadUploadProgressHandler_ashx" />
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
      <remove name="Telerik_Web_UI_WebResource_axd" />
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
    </handlers>
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.1.0.3" newVersion="2.1.0.3" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>


Regards,
Hristo Valyavicharski
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ravi
Top achievements
Rank 1
answered on 19 Aug 2014, 03:58 PM
Thank you  for the reply , if I  Keep CombineScripts = false then it will generate too many axd files for ajax Controls I dont want it to happen . Please suggest me a way for Combining both ajaxControlToolkit files and Telerik Files.

In Sample Project , I have referenced the path of static server for Composite Script which contains the Bundled Telerik scripts which are required for controls referenced. Below is the code for it

   public void IncludeBundleFiles(BundleCollection bundles)
        {

    bundles.Add(new ScriptBundle("~/JavaScript/TelerikListMaster").Include(
                "~/JavaScript/Telerik/Core.js",
                "~/JavaScript/Telerik/Ajax.js",
                "~/JavaScript/Telerik/jQuery.js",
                "~/JavaScript/Telerik/jQueryPlugins.js",
                "~/JavaScript/Telerik/RadGridScripts.js",
                "~/JavaScript/Telerik/GridCellSelection.js",
                "~/JavaScript/Telerik/OverlayScript.js",
                "~/JavaScript/Telerik/NavigationScripts.js",
                "~/JavaScript/Telerik/AnimationScripts.js",
                "~/JavaScript/Telerik/RadComboBoxScripts.js",
                   "~/JavaScript/Telerik/TouchScrollExtender.js",
                "~/JavaScript/Telerik/RadMenuScripts.js",
                "~/JavaScript/Telerik/RadContextMenuScripts.js",
                "~/JavaScript/Telerik/RadFilterScripts.js",
                "~/JavaScript/Telerik/RadMenuItem.js",
                "~/JavaScript/Telerik/RadAutoCompleteBoxScripts.js",
                "~/JavaScript/Telerik/PopUpScripts.js",
                "~/JavaScript/Telerik/RadToolTipScripts.js",
                "~/JavaScript/Telerik/RadToolTipManager.js",
                "~/JavaScript/Telerik/RadInputScript.js",
                "~/JavaScript/Telerik/RadNumericInputScript.js",
                "~/JavaScript/Telerik/RadCalendarCommonScript.js",
                "~/JavaScript/Telerik/RadCalendarScript.js",
                "~/JavaScript/Telerik/RadDatePicker.js",
                "~/JavaScript/Telerik/RadPickersPopupDirectionEnumeration.js",
                "~/JavaScript/Telerik/RadInputManagerScript.js"));
    }

Browser able to  download the Bundled script but telerik controls are not able to access it.

and I'm attaching the screen shots of aspx file and web.config.
1) Please suggest me a way for combining both Telerik and Ajax files.
2) Is there any other way where I can give reference of Bundled Telerik Script Files to AjaxControlToolKitScriptManager
0
Hristo Valyavicharski
Telerik team
answered on 21 Aug 2014, 07:43 AM
Hi Ravi,

At the moment it is not possible to enable script combining. 

Regards,
Hristo Valyavicharski
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ScriptManager and StyleSheetManager
Asked by
Ravi
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Ravi
Top achievements
Rank 1
Share this question
or