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

3 posts, 0 answers
  1. Dan Cao
    Dan Cao avatar
    9 posts
    Member since:
    Dec 2012

    Posted 07 Mar 2013 Link to this post

    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. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 13 Mar 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dan Cao
    Dan Cao avatar
    9 posts
    Member since:
    Dec 2012

    Posted 13 Mar 2013 Link to this post

    Thank you Dimitar.

    I just want to know that RadScriptManager support or not. So you have answered my question. Thanks
Back to Top