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

[Solved] Using <telerik:RadScriptManager

5 Answers 378 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Pramod
Top achievements
Rank 1
Pramod asked on 25 May 2008, 12:21 PM

Hi,

As documented in one of the post in forum, I am using telerik:RadScriptManager
in master page as
<telerik:RadScriptManager ID="MainRadScriptManager" runat="server">
<Scripts>
<asp:ScriptReference Path="../Javascripts/teleric/Common/Core.js" />
<asp:ScriptReference Path="../Javascripts/teleric/Common/Animation/AnimationScripts.js" />
<asp:ScriptReference Path="../Javascripts/teleric/Common/Navigation/NavigationScripts.js" />
<asp:ScriptReference Path="../Javascripts/teleric/ComboBox/RadComboBoxScripts.js" />
<asp:ScriptReference Path="../Javascripts/teleric/Ajax/Ajax.js" />
<asp:ScriptReference Path="../Javascripts/teleric/Grid/RadGridScripts.js" />
<asp:ScriptReference Path="../Javascripts/teleric/Input/TextBox/RadInputScript.js" />
<asp:ScriptReference Path="../Javascripts/teleric/Input/NumericTextBox/RadNumericInputScript.js" />
<asp:ScriptReference Path="../Javascripts/teleric/Input/MaskedTextBox/RadMaskedInputScript.js" />
</Scripts>
</telerik:RadScriptManager>

Also HTTP Handler is set in config as:
<httpHandlers>
<add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" />
</
httpHandlers>

Now the exception i am getting is like, Type teleric.Web.UI.RadUnPutControl has already been  registerd.
How to set the EnableEmbeddedScripts false for all the RadControls.
Also is this write way to do so. If possible kindly explain with some code sample, also I need to use the RadStyleSheetManager, tell me if any config or else where setting i need to make.

Thanks,
Pramod

 

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 26 May 2008, 10:31 AM
Hi Pramod,

Can you point us to the forum article you refer to and explain why you need to add the controls' scripts to the scripts collection of the ScriptManager? To set a control type property globally, you should use themes.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Pramod
Top achievements
Rank 1
answered on 27 May 2008, 04:34 AM

This is the referenced article:
http://www.telerik.com/help/aspnet-ajax/disabling_embedded_resources.html

We have a big survey application where we have more than 100 numerictextbox controls in a metrics created dynamically AND other controls in page as well. ( four different sections of same kind with other data)
This is creating a page to get rendered VERY slowly.
Though the data on page is coming quickly, DB hit is once and very fast. But we are finding problem to get the page rendered with controls very slowly, moreover the page is getting rendered at once rather then control by control.

This is taking more than 35mins in a network, and that too locally.
We tested the same application with normal .net controls , and find that very fast in just 3-5sec. BIG difference in performance.

We are using skins for each TextBox/ComboBox/RadioButton /CheckBox controls.
For RadioButton and CheckBox skins are defined in master page as
 

<

telerik:RadFormDecorator ID="RadioRadFormDecorator" runat="server" DecoratedControls="radioButtons" Skin="Mac"></telerik:RadFormDecorator>
<telerik:RadFormDecorator ID="CheckBoxRadFormDecorator" runat="server" DecoratedControls="CheckBoxes" Skin="Mac"></telerik:RadFormDecorator>

We need to optimise the application and left with less than a week, kindly suggest what all measures we need to take to get the Page Rendering optimized.
Note: I would expect a LOT details solution to this rather than you just provide me the links to other forum queries, I have already read most of them.

Thanks,
Pramod Singh


 

0
Missing User
answered on 27 May 2008, 01:51 PM
Hello Pramod,

If you need to disable the embedded scripts for all RadControls in your web site/web application project or you want to do that for each instance of a particular RadControl, you can do that very easily modifying the web.config file as follows:

<appSettings> 
  <add key="Telerik.[ShortProductName].EnableEmbeddedScripts" value="false"/> 
  <add key="Telerik.EnableEmbeddedScripts" value="false"/>          
</appSettings>  


The scripts enable/disable is prioritized as follows:

    * The settings applied at page level have top priority
    * The settings applied for a particular control in the web.config file are next in priority
    * The settings applied for all RadControls globally in the web.config file are last in priority

Hence the individual scripts disabling for a particular control in the web.config will override the setting defined for all controls globally in the same file, while the page level scripts disabling will override all relevant definitions from the web.config file.


Best wishes,
Plamen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Pramod
Top achievements
Rank 1
answered on 27 May 2008, 02:12 PM
I did tried that, in this case am getting an exception "Teleric" is not defined.

What this Teleric resembles in
Telerik.EnableEmbeddedScripts
<appSettings> 
  <add key="Telerik.[ShortProductName].EnableEmbeddedScripts" value="false"/> 
  <add key="Telerik.EnableEmbeddedScripts" value="false"/>          
</appSettings

And the main question regarding the optimization is not satisfactory, infact not answered. Will this help to optimise my application.
Any other way I can go to optimize my teleric control application.


Thanks,
Pramod Singh
0
Missing User
answered on 28 May 2008, 02:28 PM
Hello Pramod,

Up to your problems:

1) You will also need to add a script reference for each JavaScript file through the ScriptManager or RadScriptManager. Please find attached a sample web application that demonstrates the needed approach.
Disabling Web Resources may be helpful if you want to modify some existing JavaScript files. Some users also want to deploy the JavaScript file on a different web server to reduce the load.

2) We are currently working on the performance of the RadInput and one of our main goals for the next version, due in July, is to reduce the loading time of the controls.

Kind regards,
Plamen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
Pramod
Top achievements
Rank 1
Answers by
Steve
Telerik team
Pramod
Top achievements
Rank 1
Missing User
Share this question
or