How to use RadScriptManager

7 posts, 1 answers
  1. FAR
    FAR avatar
    26 posts
    Member since:
    May 2009

    Posted 20 Nov 2009 Link to this post

    Hi, I have a website with a lot of telerik Controls.

    I have a master page with the radScriptManager in it :

        <telerik:RadScriptManager ID="RadScriptManager2" runat="server"
        </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        </telerik:RadAjaxManager> 

    And in my content page i have :

    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"
        <link href="Css/Global.css" rel="stylesheet" type="text/css" /> 
         <script type="text/javascript"
          // A lot of functions here 
    </script> 


    Is it enough to make it work properly?
    Are all the javascript of telerik control already managed by the radscript manager or do i have to declare something else inside?
    Will the Javascript of my Content page be managed by default by the radscriptmanager?
    If i have Custom Css ON the content page like this

      <style type="text/css"
            .rcbHeader ul, 
    .rcbFooter ul, 
    .rcbItem ul, .rcbHovered ul, .rcbDisabled ul 
        width: 100%; 
        display: inline-block; 
        margin: 0; 
        padding: 0; 
        list-style-type: none; 
    </style> 

    and also ONE css file (and just one) in the Css Folder.

    Does I need to declare the radstylesheetmanager?
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 20 Nov 2009 Link to this post

    Hello FAR,

    RadScriptManager can combine only javascript files that are embedded in an assembly. This means that your custom functions will not be included in the combined script but will be rendered separately.
    As for the CSS - you need to use RadStyleSheetManager - it combines the css rules embedded in an assembly.

    Kind regards,
    Veselin Vasilev
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. FAR
    FAR avatar
    26 posts
    Member since:
    May 2009

    Posted 24 Nov 2009 Link to this post

    Yeah and how can i include ALL of my CSS in the radstylesheetmanager ?
    (by ALL i mean :
    _the Css included in the telerik DLL that i can't access
    _the Css on my .aspx page beetween the <style></style>
    for example :
    //my aspx page     
    <style type="text/css"
            .rcbHeader ul, 
    .rcbFooter ul, 
    .rcbItem ul, .rcbHovered ul, .rcbDisabled ul 
        width: 100%; 
        display: inline-block; 
        margin: 0; 
        padding: 0; 
        list-style-type: none; 
    </style> 
     
    // my body 

    and finally my custom css file
    for example : global.css

    Question 2) If global.css is included in the radscript manager,and not in an external file for the broswer it's mean the navigator can't "cache" it?
  5. Answer
    Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 26 Nov 2009 Link to this post

    Hi FAR,

    RadStyleSheetManager (link) can combine only embedded web resources. Please check the provided link - it shows you how to create a new class library and include your CSS file as an embedded resource. Then you can reference that assembly in the style sheet manager and it will combine it.

    Kind regards,
    Veselin Vasilev
    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.
  6. Basel Nimer
    Basel Nimer avatar
    94 posts
    Member since:
    Oct 2009

    Posted 20 Jun 2010 Link to this post

    I read somewhere in Telerik that RadScriptManager inherits from Microsoft ScriptManager, and you are saying here that RadScriptManager cannot use but Embedded scripts, but Microsoft ScriptManager can.
    http://www.asp.net/ajaxlibrary/Combining%20Client%20Scripts%20into%20a%20Composite%20Script.ashx

    am i missing something?




  7. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 23 Jun 2010 Link to this post

    Hi Basel,

    The composite scripts feature is indeed inherited from the ScriptManager and can be used when using the 3.5 or 4.0 builds of RadControls.

    I hope this helps.

    Regards,
    Tsvetomir Tsonev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Basel Nimer
    Basel Nimer avatar
    94 posts
    Member since:
    Oct 2009

    Posted 23 Jun 2010 Link to this post

    So i cannot use it with external JS files unless i am using .NET higher than 2.0?!


Back to Top
UI for ASP.NET Ajax is Ready for VS 2017