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

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

1 Answer 28 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
vincent
Top achievements
Rank 1
vincent asked on 28 Dec 2012, 05:16 PM
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?

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 02 Jan 2013, 02:29 PM
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.
Tags
Ajax
Asked by
vincent
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or