How do you resolve code blocks inside a a js file that is referenced in CompositeScript?

2 posts, 0 answers
  1. vincent
    vincent avatar
    61 posts
    Member since:
    Jun 2008

    Posted 28 Dec 2012 Link to this post

    In my aspx page I do this:

     
    <telerik:RadScriptManager ID="ScriptManager" Runat="Server" EnablePageMethods="True" ><br>        <CompositeScript><br>            <Scripts><br>                <asp:ScriptReference Path="~/Modules/TicketType/Ticket_TypeDDL.js" /><br>            </Scripts><br>        </CompositeScript><br>    </telerik:RadScriptManager>

       then in the referenced js file I have this:



     var ddlTicketTypeList = $find("<%= ddlTicketTypeList.ClientID %>");<br>   ddlTicketTypeList.trackChanges();


    However, ddlTicketTypeList is always null. 

    How do I resolve what is inside the code block using the referenced js files?
  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1096 posts

    Posted 02 Jan 2013 Link to this post

    Hi Vincent,

    I am sorry to say but ASP.NET framework does not process external JavaScript files and does not parse the code blocks ( <%= ... %> syntax). I suggest that you take a look at this forum post where the same problem was discussed.

    Kind regards,
    Angel Petrov
    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.
Back to Top