RadScriptManager issues

8 posts, 0 answers
  1. Nick
    Nick avatar
    139 posts
    Member since:
    Mar 2006

    Posted 25 Mar 2009 Link to this post

    We're trying to get this working with some large scripts we have. 

    The help seems woefully small given the complexity of what is going on here - most of the properites aren't documented.

    We added several scripts with the default settings, but nothing seems to be happening.

    Here's the code in our test web page:
        <telerik:RadScriptManager ID="ScriptManager1" runat="server">  
            <Scripts> 
                <asp:ScriptReference Path="/midas.js" /> 
                <asp:ScriptReference Path="/midas2.js" /> 
            </Scripts> 
        </telerik:RadScriptManager> 

    As you can see, we have the default settings.  We see no difference in HTTPWatch whatsoever.  If we move the JS files out from the script manager, it looks exactly the same.  The files do not seem to combine nor do they seem to compress.

    Is there something more we need to configure? 

    Thanks,
    Nick H
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 25 Mar 2009 Link to this post

    Hello Nick,

    This is by design. RadScriptManager does not combine script references which have only Path set. RadScriptManager can combine only javascript files which are embedded as resources.
     
    All the best,
    Albert
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nick
    Nick avatar
    139 posts
    Member since:
    Mar 2006

    Posted 25 Mar 2009 Link to this post

    So there is no point in sending a .js files to the radscriptmanager then?
  5. Nick
    Nick avatar
    139 posts
    Member since:
    Mar 2006

    Posted 25 Mar 2009 Link to this post

    Ok after doing some research on embedded resources with javascripts, I see it's actually pretty easy to create them - property change on the .CS file.

    Is it possible get a sample showing how to properly implement this with radscriptmanager, i.e.  I see how to create the enbedded resource, but the samples I am finding are a bit confusing and of course don't show how to integrate it with radscriptmanager.

    I would think this could be valuable to a lot of people. 
  6. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 26 Mar 2009 Link to this post

    Hi Nick,

    By all means. Please find attached a sample solution which demonstrates how to embed javascript files as web resources and then combine them with RadScriptManager.

    Regards,
    Albert
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  7. Connections Academy Developer
    Connections Academy Developer avatar
    63 posts
    Member since:
    May 2005

    Posted 30 Apr 2009 Link to this post

    Your example is helpful, but it only shows how to add a ScriptReference by referring to its DLL/Assembly.  I am looking for an example that shows how to do something such as:

    RadScriptManager scriptManager = new RadScriptManager();
    scriptManager.Scripts.Add(new ScriptReference(url));

    This isn't working for me - none of the url's I pass to this call:

    scriptManager.Scripts.Add(new ScriptReference(url));

    end up being rendered to the page by the call to the Telerik.Web.UI.WebResource.axd.

    Please advise, thank you.
  8. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 30 Apr 2009 Link to this post

    Hello,

    As explained earlier in this thread RadScriptManager does not combine scripts referenced by url. Only scripts embedded as web resources are combined.

    All the best,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  9. Connections Academy Developer
    Connections Academy Developer avatar
    63 posts
    Member since:
    May 2005

    Posted 30 Apr 2009 Link to this post

    Yes, I understood that it wouldn't combine them - but I at least expected that it would render them in some fashion.  Essentially, you can't register scripts by URL at all, yet the method/code would make one believe that it is allowed and supported.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017