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

How to use RadScriptManager

6 Answers 1204 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
FAR
Top achievements
Rank 1
FAR asked on 20 Nov 2009, 10:33 AM
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?

6 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 20 Nov 2009, 01:21 PM
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.
0
FAR
Top achievements
Rank 1
answered on 24 Nov 2009, 01:42 PM
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?
0
Accepted
Veselin Vasilev
Telerik team
answered on 26 Nov 2009, 09:09 AM
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.
0
Basel Nimer
Top achievements
Rank 2
answered on 20 Jun 2010, 02:42 PM
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?




0
T. Tsonev
Telerik team
answered on 23 Jun 2010, 12:38 PM
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
0
Basel Nimer
Top achievements
Rank 2
answered on 23 Jun 2010, 01:09 PM
So i cannot use it with external JS files unless i am using .NET higher than 2.0?!


Tags
ScriptManager and StyleSheetManager
Asked by
FAR
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
FAR
Top achievements
Rank 1
Basel Nimer
Top achievements
Rank 2
T. Tsonev
Telerik team
Share this question
or