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

Can I add the version number at the trail of Path?

2 Answers 53 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Dan Cao
Top achievements
Rank 1
Dan Cao asked on 08 Mar 2013, 04:52 AM
Hi,

Can I have the version number at the trail of Path in RadScriptManager or StyleSheetManager?

The example as below
<asp:ScriptReference Name="”MyNamespace.MyFile.js”" Assembly="”MyAsembly”" 
Path="/MyVirtualLocation/MyFile.js?v=1.1.1.1">

Can I do as above code? 

Any help is appriciate.
Dan

2 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 13 Mar 2013, 10:58 AM
Hi Dan,
 
The RadScriptManager does not support parametrization of the web resource requests. If you need to add dynamic parameter to a script registration the following approach could be used:
Page.Header.Controls.Add(
           new LiteralControl("<script type=\"text/javascript\"  src=\"" + ResolveUrl("/MyVirtualLocation/MyFile.js?v=" + VersionNumber) + "\" />"));

The above suggested approach is applicable when the script is located as a file on the file system and not embedded in an assembly.

All the best,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Dan Cao
Top achievements
Rank 1
answered on 13 Mar 2013, 12:37 PM
Thank you Dimitar.

I just want to know that RadScriptManager support or not. So you have answered my question. Thanks
Tags
ScriptManager and StyleSheetManager
Asked by
Dan Cao
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Dan Cao
Top achievements
Rank 1
Share this question
or