Loading External Javascript Files

2 posts, 0 answers
  1. Robert
    Robert avatar
    253 posts
    Member since:
    Aug 2007

    Posted 22 May 2013 Link to this post

    In the Master Page of my ASP.NET 4.0 project I have this code:

    <form id="form1" runat="server">
      <%-- Note: The 'AsyncPostBackTimeOut' value was added to try to increase the timeout during debugging; the value is in seconds --%>
      <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" EnablePageMethods="true" AsyncPostBackTimeout="300">
        <Scripts>
          <%-- Note: In order to get jQuery Intellisense working, this procedure had to be followed: http://www.telerik.com/help/aspnet-ajax/introduction-jquery-intellisense.html --%>
          <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
          <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
          <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
     
          <asp:ScriptReference Path="~/Javascript/tools-1.0.1.js" />
          <asp:ScriptReference Path="~/Javascript/common-1.0.1.js" />
        </Scripts>
      </asp:ScriptManager>

    Is there any known issue/bug that would prevent those two external Javascript files from being loaded properly each & every time?  Specifically, I'm wondering if anything about the way I'm loading the jQuery files via the Telerik DLL would prevent my own custom Javascript files from being loaded?

    I ask because within "common-1.0.1.js" I have 3 related AJAX Request Handlers that are consistently not being loaded when the user starts my app in IE9.  Only after the user presses Ctrl-F5 does the code become active.

    Any ideas how to fix this?

    Robert

  2. msigman
    msigman avatar
    141 posts
    Member since:
    Apr 2008

    Posted 22 May 2013 Link to this post

    Hi Robert,

    Have you tried using the script combining feature introduced in Q1 2013? http://www.telerik.com/help/aspnet-ajax/scriptmanager-combine-scripts.html

    Also, you can try using CompositeScripts:
    <form id="form1" runat="server">
      <%-- Note: The 'AsyncPostBackTimeOut' value was added to try to increase the timeout during debugging; the value is in seconds --%>
      <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" EnablePageMethods="true" AsyncPostBackTimeout="300">
        <Scripts>
          <%-- Note: In order to get jQuery Intellisense working, this procedure had to be followed: http://www.telerik.com/help/aspnet-ajax/introduction-jquery-intellisense.html --%>
          <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
          <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
          <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
      </Scripts>
     
       <CompositeScript>
          <Scripts>
             <asp:ScriptReference Path="~/Javascript/tools-1.0.1.js" />
             <asp:ScriptReference Path="~/Javascript/common-1.0.1.js" />
          </scripts>
       </CompositeScript>
    </asp:ScriptManager>
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top