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

Combining telerik scripts and custom scripts into single file

3 Answers 127 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
sonal
Top achievements
Rank 1
sonal asked on 01 Sep 2008, 03:28 AM
Hi,
    I want all the Telerik scripts and custom scripts (non-telerik) to be combined into one file using the RadScriptManager and hence single request.
Do i need to combine all the custom js files into an assembly and then use the <asp:ScriptReference>?  Is it  not possible to combine the custom scripts without adding them to an assembly?

Thanks
Sonal

3 Answers, 1 is accepted

Sort by
0
Prangadj
Top achievements
Rank 1
answered on 01 Sep 2008, 11:28 AM
Telerik ScriptManager works as the asp ScriptManager as far as I know. I found this topic in the docs which explains how it works:

http://www.telerik.com/help/aspnet-ajax/radscriptmanager.html

Prangadj
0
sonal
Top achievements
Rank 1
answered on 02 Sep 2008, 02:44 AM
Hi,
     I had already tried the following:

<telerik:RadScriptManager id=””runat=””>
 
<Scripts>
  
<asp:ScriptReference name=””Assembly=””Path=”/MyVirtualLocation/MyFile.js”>
 
</Scripts>
</telerik:RadScriptManager>

But it gives error as:
Resource not found in assembly "Telerik.Web.UI"

Thanks
Sonal

0
Erjan Gavalji
Telerik team
answered on 03 Sep 2008, 06:39 AM
Hi Sonal,

Currently RadScriptManager does not combine scripts, identified by a path. The control combines only scripts, which are added as embedded resources to an external assembly. This functionality is similar to RadStyleSheetManager's external stylesheet combination, described in the RadStyleSheetManager documentation article.

Kind regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
sonal
Top achievements
Rank 1
Answers by
Prangadj
Top achievements
Rank 1
sonal
Top achievements
Rank 1
Erjan Gavalji
Telerik team
Share this question
or